﻿/* مدیریت آدرس‌ها - محتوای اصلی */
.address-profile-content {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 30px;
    width: 100%;
}

.address-profile-section {
    margin-bottom: 40px;
}

.address-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.address-section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 600;
}

.address-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

    .address-btn:hover {
        background: #3d8b40;
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

.address-btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

    .address-btn-outline:hover {
        background: var(--primary-color);
        color: white;
    }

/* لیست آدرس‌ها */
.address-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.address-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    transition: var(--transition);
    position: relative;
}

    .address-item:hover {
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .address-item.address-default {
        border-color: var(--secondary-color);
        background: linear-gradient(135deg, #f8fff8, #e8f5e8);
    }

.address-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.address-item-title {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.address-default-badge {
    background: var(--secondary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.address-item-actions {
    display: flex;
    gap: 10px;
}

.address-edit-btn,
.address-delete-btn {
    background: none;
    border: none;
    color: var(--gray-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: var(--transition);
    font-size: 0.9rem;
}

    .address-edit-btn:hover {
        color: var(--primary-color);
        background: rgba(45, 80, 22, 0.1);
    }

    .address-delete-btn:hover {
        color: var(--danger-color);
        background: rgba(231, 76, 60, 0.1);
    }

.address-item-content {
    color: var(--dark-color);
}

.address-item-text {
    margin-bottom: 10px;
    line-height: 1.6;
}

.address-item-phone {
    color: var(--gray-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

    .address-item-phone i {
        font-size: 0.8rem;
    }

/* حالت خالی */
.address-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-color);
}

    .address-empty-state i {
        font-size: 4rem;
        color: #e9ecef;
        margin-bottom: 20px;
    }

    .address-empty-state h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
        color: var(--dark-color);
    }

    .address-empty-state p {
        font-size: 0.9rem;
        max-width: 400px;
        margin: 0 auto;
        line-height: 1.6;
    }

/* فرم آدرس */
.address-profile-form {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
}

.address-form-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 600;
}

.address-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.address-form-group {
    margin-bottom: 25px;
    position: relative;
}

.address-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.address-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background: white;
}

    .address-form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
    }

    .address-form-control.address-error {
        border-color: var(--danger-color);
        box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
    }

.address-textarea {
    resize: vertical;
    min-height: 100px;
}

.address-error-message {
    font-size: 0.85rem;
    color: var(--danger-color);
    margin-top: 5px;
    display: none;
}

/* چک‌باکس */
.address-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: var(--dark-color);
}

.address-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
}

#address-is-default {
    display: none;
}

    #address-is-default:checked + .address-checkbox-custom {
        background: var(--secondary-color);
        border-color: var(--secondary-color);
    }

        #address-is-default:checked + .address-checkbox-custom:after {
            content: "✓";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 0.8rem;
            font-weight: bold;
        }

.address-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.address-success-message {
    background: #e8f5e8;
    border: 1px solid #c8e6c9;
    color: #2d5016;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 10px;
}

    .address-success-message i {
        color: #27ae60;
    }

/* رسپانسیو */
@media (max-width: 768px) {
    .address-profile-content {
        padding: 20px;
    }

    .address-section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .address-section-title {
        text-align: center;
    }

    .address-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .address-action-buttons {
        flex-direction: column;
    }

    .address-item-header {
        flex-direction: column;
        gap: 15px;
    }

    .address-item-actions {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .address-profile-content {
        padding: 15px;
    }

    .address-profile-form {
        padding: 20px;
    }

    .address-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        justify-content: center;
        width: 100%;
    }

    .address-item {
        padding: 15px;
    }

    .address-empty-state {
        padding: 40px 15px;
    }

        .address-empty-state i {
            font-size: 3rem;
        }
}
