/* Address Manager Styles */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Modal Content */
.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Modal Header */
.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #231f20;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: #e9ecef;
    color: #000;
}

/* Modal Body */
.modal-body {
    padding: 30px;
}

/* Modal Footer */
.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Form Styles */
.address-form {
    max-width: 100%;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.form-group {
    margin-bottom: 20px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
}

.form-group.col-md-6 {
    width: 50%;
}

.form-group.col-md-4 {
    width: 33.333%;
}

/* .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
} */

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #1994d2;
    box-shadow: 0 0 0 2px rgba(25, 148, 210, 0.1);
}

.form-control:invalid {
    border-color: #dc3545;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.form-check-input {
    margin-right: 10px;
    width: auto;
}

.form-check-label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #1994d2;
    color: white;
    border: 2px solid #1994d2;
}

.btn-primary:hover {
    background-color: #005287;
    border-color: #005287;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: 2px solid #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Address Book Styles */
.address-book-list {
    max-height: 400px;
    overflow-y: auto;
}

.address-item {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: border-color 0.2s;
}

.address-item:hover {
    border-color: #1994d2;
}

.address-content {
    flex-grow: 1;
    line-height: 1.5;
    color: #333;
}

.address-content strong {
    font-weight: 600;
    color: #231f20;
}

.address-actions {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
    
    .form-group.col-md-6,
    .form-group.col-md-4 {
        width: 100%;
    }
    
    .form-row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .form-group {
        padding-left: 0;
        padding-right: 0;
    }
    
    .address-item {
        flex-direction: column;
        gap: 15px;
    }
    
    .address-actions {
        margin-left: 0;
        align-self: flex-start;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .modal-footer .btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .modal-header h3 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Loading and Error States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-group.has-error .form-control {
    border-color: #dc3545;
}

.form-group.has-error .error-message {
    display: block;
}

/* Success States */
.form-group.has-success .form-control {
    border-color: #28a745;
}

/* Animation for modal appearance */
.modal-overlay {
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Address display improvements */
.project_ship-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project_ship-content li {
    padding: 3px 0;
    line-height: 1.4;
}

/* .address-mark {
    background-color: #1994d2;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px;
    text-transform: uppercase;
}

.address-mark.billing {
    background-color: #28a745;
} */

/* Make address action buttons more prominent */
.project_ship-actions .action {
    margin-bottom: 5px;
    display: inline-block;
    min-width: 120px;
    text-align: center;
}

.project_ship-actions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.project_ship-actions li {
    margin-bottom: 8px;
}
