/* Account Addresses Page Styles */

/* Page Actions */
.page-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.page-actions .add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Addresses List */
.addresses-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 0;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    background: #fff;
    border-radius: 24px;
    border: 2px dashed #e8e8e8;
}

.empty-state i {
    font-size: 80px;
    color: rgba(242, 106, 48, 0.15);
    margin-bottom: 24px;
}

.empty-state h3 {
    color: #1e1e1e;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.empty-state p {
    color: #6a6a6a;
    font-size: 14px;
    margin: 0 0 24px 0;
    line-height: 1.6;
    max-width: 400px;
}

/* Address Card */
.address-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

.address-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f26a30 0%, #ffb07b 100%);
    opacity: 0;
    border-radius: 20px 20px 0 0;
    transition: opacity 0.3s;
}

.address-card:hover {
    box-shadow: 0 16px 40px rgba(242, 106, 48, 0.15);
    border-color: rgba(242, 106, 48, 0.2);
    transform: translateY(-4px);
}

.address-card:hover::before {
    opacity: 1;
}

.address-card.default {
    background: linear-gradient(135deg, rgba(242, 106, 48, 0.05) 0%, rgba(255, 174, 120, 0.05) 100%);
    border-color: rgba(242, 106, 48, 0.15);
}

.address-card.default .address-card-header::after {
    content: '⭐ پیش‌فرض';
    position: absolute;
    top: 0;
    left: 0;
    background: #f26a30;
    color: #fff;
    padding: 4px 12px;
    border-radius: 0 20px 0 12px;
    font-size: 11px;
    font-weight: 700;
}

/* Address Card Header */
.address-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.address-title {
    color: #1e1e1e;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    flex: 1;
}

.address-default-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(63, 89, 94, 0.1) 0%, rgba(63, 89, 94, 0.05) 100%);
    color: #3f595e;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* Address Details */
.address-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.address-details > div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6a6a6a;
    font-size: 13px;
    line-height: 1.5;
}

.address-details strong {
    color: #1e1e1e;
    font-weight: 700;
}

.address-details i {
    color: #f26a30;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Address Actions */
.address-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.address-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid;
    white-space: nowrap;
}

.address-actions .btn-color-primary {
    background: #f26a30;
    color: #fff;
    border-color: #f26a30;
}

.address-actions .btn-color-primary:hover {
    background: #b00538;
    border-color: #b00538;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 106, 48, 0.3);
}

.address-actions .btn-color-white {
    background: #fff;
    color: #f26a30;
    border-color: #f26a30;
}

.address-actions .btn-color-white:hover {
    background: rgba(242, 106, 48, 0.05);
    border-color: #b00538;
    color: #b00538;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 106, 48, 0.15);
}

.address-actions .btn i {
    font-size: 13px;
}

/* Modal Styles */
.address-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.address-modal-content {
    background: #fff;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px 24px 0 0;
    padding: 32px 24px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.address-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.address-modal-header h3 {
    color: #1e1e1e;
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}

.close-btn {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1e1e1e;
    transition: all 0.3s;
    flex-shrink: 0;
}

.close-btn:hover {
    background: #f26a30;
    color: #fff;
    transform: rotate(90deg);
}

/* Address Form */
.address-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #1e1e1e;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label .required {
    color: #f26a30;
}

.form-input,
.form-group textarea {
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 13px;
    color: #1e1e1e;
    background: #fff;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
}

.form-input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

.form-input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f26a30;
    box-shadow: 0 0 0 4px rgba(242, 106, 48, 0.1);
    background: rgba(242, 106, 48, 0.02);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: #1e1e1e;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #f26a30;
    flex-shrink: 0;
}

/* Form Actions */
.address-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.address-form-actions .btn {
    flex: 1;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(242, 106, 48, 0.1);
    border-top-color: #f26a30;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: #6a6a6a;
    font-size: 14px;
    margin: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .addresses-list {
        grid-template-columns: 1fr;
    }
    
    .page-actions .add-btn {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .address-modal-content {
        padding: 20px;
    }
    
    .address-modal-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .address-modal-header h3 {
        font-size: 18px;
    }
    
    .address-form {
        gap: 16px;
    }
    
    .address-actions {
        gap: 8px;
    }
    
    .address-actions .btn {
        font-size: 11px;
        padding: 8px 12px;
    }
    
    .empty-state {
        padding: 60px 20px;
    }
    
    .empty-state i {
        font-size: 60px;
    }
}

@media (max-width: 480px) {
    .addresses-list {
        gap: 16px;
    }
    
    .address-card {
        padding: 16px;
        gap: 12px;
    }
    
    .address-title {
        font-size: 14px;
    }
    
    .address-details > div {
        font-size: 12px;
    }
    
    .address-actions {
        flex-direction: column;
    }
    
    .address-actions .btn {
        flex: unset;
        width: 100%;
        font-size: 12px;
    }
    
    .page-actions {
        flex-direction: column;
    }
    
    .page-actions .add-btn {
        width: 100%;
    }
}

