/* ==========================================================
   CUSTOM ADDRESS FORM STYLING
   ========================================================== */

/* ==========================================================
   MODERN MY ADDRESS PAGE STYLING
   ========================================================== */

/* WooCommerce Account Background */
.woocommerce-account .woocommerce {
    background: #f7fdfb !important;
    box-shadow: none !important;
}

/* Modern Address Page Container */
.modern-address-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    position: relative;
}

.modern-address-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.modern-address-page > * {
    position: relative;
    z-index: 1;
}

/* Page Header - Removed */

/* Page Header styles removed */

/* Address Page Content */
.address-page-content {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Intro Section */
.intro-section {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.intro-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.intro-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.intro-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: white !important;
    position: relative;
    z-index: 2;
}

.intro-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.6;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

/* Address Grid */
.address-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)) !important;
    gap: 3rem !important;
    padding: 3rem !important;
    position: relative !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.address-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* Address Card */
.address-card {
    background: white !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
    transition: all 0.4s ease !important;
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.address-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}

.address-card:hover {
    transform: translateY(-8px);
}

/* Card Header */
.card-header {
    padding: 2rem !important;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.title-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white !important;
    position: relative;
    z-index: 2;
}

.card-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0;
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-btn {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-btn:hover {
    transform: translateY(-2px);
    color: white;
}

/* Card Body */
.card-body {
    padding: 2rem !important;
    min-height: 140px !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.01) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.01) 0%, transparent 50%);
    pointer-events: none;
}

.address-content {
    width: 100%;
}

.formatted-address {
    font-style: normal;
    line-height: 1.8;
    color: #374151;
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

/* Empty Address State */
.empty-address {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fef7cd 100%);
    border-radius: 8px;
    border: 1px solid #fbbf24;
}

.empty-icon {
    width: 40px;
    height: 40px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.empty-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #92400e;
}

.empty-text p {
    font-size: 0.9rem;
    color: #a16207;
    margin: 0;
    line-height: 1.4;
}

/* Card Footer */
.card-footer {
    padding: 2rem !important;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
    border-top: 1px solid #e2e8f0 !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.card-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.footer-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: white;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    color: white;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline-secondary {
    background: transparent;
    color: #6b7280;
    border: 2px solid #d1d5db;
    position: relative;
    overflow: hidden;
}

.btn-outline-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #6b7280;
    transition: width 0.4s ease;
    z-index: -1;
}

.btn-outline-secondary:hover {
    color: white;
    border-color: #6b7280;
    transform: translateY(-3px);
}

.btn-outline-secondary:hover::before {
    width: 100%;
}

/* Copy Address Functionality - Removed */

/* ==========================================================
   EDIT ADDRESS FORM - MODERN PROFESSIONAL STYLING
   ========================================================== */

/* Edit Address Page Container */
.woocommerce-edit-address-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: #f7fdfb;
    min-height: 100vh;
    position: relative;
}

/* Edit Address Header */
.edit-address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.edit-address-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0;
    line-height: 1.5;
}

.header-actions {
    position: relative;
    z-index: 2;
}

/* Form Container */
.edit-address-form-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e2e8f0;
}

/* Form Header */
.form-header {
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.form-description {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Form Content */
.form-content {
    padding: 2rem;
}

/* Address Form Wrapper - Styling removed */

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row.single {
    grid-template-columns: 1fr;
}

/* Form Field Wrapper */
.form-field-wrapper {
    position: relative;
}

/* Modern Input Styling */
.form-field-wrapper input[type="text"],
.form-field-wrapper input[type="email"],
.form-field-wrapper input[type="tel"],
.form-field-wrapper input[type="number"],
.form-field-wrapper select,
.form-field-wrapper textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #1f2937;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-field-wrapper input:focus,
.form-field-wrapper select:focus,
.form-field-wrapper textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.form-field-wrapper input:hover,
.form-field-wrapper select:hover,
.form-field-wrapper textarea:hover {
    border-color: #cbd5e1;
}

/* Label Styling */
.form-field-wrapper label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Required Field Indicator */
.form-field-wrapper .required {
    color: #ef4444;
    font-weight: 700;
}

/* Form Actions */
.form-actions {
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Modern Button Styling */
.save-address-btn {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.save-address-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.save-address-btn:active {
    transform: translateY(0);
}

.btn-outline-secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e2e8f0;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-outline-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #374151;
    transform: translateY(-2px);
}

/* Form Info */
.form-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.text-primary {
    color: var(--brand-primary) !important;
}

.text-danger {
    color: #ef4444 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .woocommerce-edit-address-page {
        padding: 1rem;
    }
    
    .edit-address-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .save-address-btn,
    .btn-outline-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .form-header,
    .form-content,
    .form-actions {
        padding: 1.5rem;
    }
    
    /* .address-form-wrapper - Responsive styling removed */
}

/* Enhanced Visual Effects */
.modern-address-page {
    position: relative;
}

.modern-address-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.03) 0%, transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(16, 185, 129, 0.03) 0%, transparent 30%);
    pointer-events: none;
    z-index: 0;
}

/* Enhanced Card Animations */
.address-card {
    position: relative;
    overflow: hidden;
}

.address-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.address-card:hover::after {
    opacity: 1;
}

/* Enhanced Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* Enhanced Typography */
.page-title {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/* Enhanced Card Shadows - Removed */

/* Enhanced Formatted Address */
.formatted-address {
    position: relative;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin: 0.5rem 0;
}

.formatted-address::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 12px;
}

/* Enhanced Empty State */
.empty-address {
    position: relative;
    overflow: hidden;
}

.empty-address::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Enhanced Intro Card */
.intro-card {
    position: relative;
    overflow: hidden;
}

.intro-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* Enhanced Icons */
.intro-icon,
.title-icon {
    position: relative;
    overflow: hidden;
}

.intro-icon::before,
.title-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* Enhanced Button Hover Effects */
.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #059669 100%);
}

.btn-outline-secondary:hover {
    background: #4b5563;
    border-color: #4b5563;
}

/* Enhanced Card Header */
.card-header {
    position: relative;
    overflow: hidden;
}

.card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Enhanced Card Body */
.card-body {
    position: relative;
    overflow: hidden;
}

.card-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.01) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.01) 0%, transparent 50%);
    pointer-events: none;
}

/* Enhanced Card Footer */
.card-footer {
    position: relative;
    overflow: hidden;
}

.card-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-address-page {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .address-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .card-title {
        justify-content: center;
    }
    
    .card-actions {
        justify-content: center;
    }
    
    .footer-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .intro-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Enhanced Loading States */
.address-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.address-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.address-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 1.5s infinite;
    z-index: 10;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced Focus States */
.address-card:focus-within {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Enhanced Scroll Animations */
.address-card {
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease forwards;
}

.address-card:nth-child(1) { animation-delay: 0.1s; }
.address-card:nth-child(2) { animation-delay: 0.2s; }
.address-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Micro-interactions */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

/* Enhanced Card Hover States */
.address-card:hover .title-icon {
    transform: scale(1.1) rotate(5deg);
}

.address-card:hover .card-title h3 {
    color: var(--brand-primary);
}

/* Enhanced Typography Hierarchy */
.page-title {
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 2px;
}

/* Enhanced Empty State Animation */
.empty-address {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Enhanced Formatted Address Styling */
.formatted-address {
    position: relative;
    z-index: 2;
}

.formatted-address::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 12px;
}

/* Enhanced Button States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Enhanced Card Transitions */
.address-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.address-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Enhanced Grid Layout */
.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
    padding: 3rem;
    position: relative;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 480px) {
    .modern-address-page {
        padding: 0.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .address-grid {
        padding: 1rem;
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .intro-card {
        padding: 1.5rem;
    }
    
    .intro-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .title-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Enhanced Tablet Responsiveness */
@media (max-width: 768px) and (min-width: 481px) {
    .address-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .card-title {
        justify-content: center;
    }
    
    .card-actions {
        justify-content: center;
    }
    
    .footer-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .intro-card {
        flex-direction: column;
        text-align: center;
    }
}

/* No Addresses Message */
.no-addresses-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.no-addresses-message h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 1rem 0;
}

.no-addresses-message p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* Force Address Cards to Show */
.address-card {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    min-height: 200px !important;
}

/* Enhanced Large Screen Optimization */
@media (min-width: 1200px) {
    .address-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4rem;
        padding: 4rem;
    }
    
    .modern-address-page {
        padding: 4rem 2rem;
    }
    
    .page-title {
        font-size: 3.5rem;
    }
    
    .page-subtitle {
        font-size: 1.5rem;
    }
}

/* ==========================================================
   CUSTOM ADDRESS FORM STYLING
   ========================================================== */

/* Address Form Wrapper - Styling removed */

/* Form Grid Layout */
.address-form-wrapper .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.address-form-wrapper .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.address-form-wrapper .form-row.single {
    display: block;
}

.address-form-wrapper .form-row > .form-field {
    flex: 1;
}

.address-form-wrapper .form-row.single > .form-field {
    flex: none;
}

/* Form Field Styling */
.address-form-wrapper .form-field {
    position: relative;
}

.address-form-wrapper .form-field label {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 5px;
    display: block;
    color: #374151;
}

.address-form-wrapper input,
.address-form-wrapper select {
    width: 100%;
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    font-size: 14px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.address-form-wrapper input:focus,
.address-form-wrapper select:focus {
    border-color: #3ac6a9;
    box-shadow: 0 0 0 3px rgba(58,198,169,0.2);
    outline: none;
    transform: translateY(-1px);
}

.address-form-wrapper input::placeholder,
.address-form-wrapper textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Required Field Indicator */
.address-form-wrapper .required {
    color: #ef4444;
    margin-left: 0.25rem;
    font-weight: 600;
}

/* Select Dropdown Styling */
.address-form-wrapper select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.address-form-wrapper select:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%233ac6a9' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Textarea Styling */
.address-form-wrapper textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Button Styling */
.address-form-wrapper .save-address {
    background: linear-gradient(45deg, #3ac6a9, #3498db);
    border-radius: 8px;
    padding: 12px 25px;
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: none;
    box-shadow: 0 2px 8px rgba(58, 198, 169, 0.3);
    position: relative;
    overflow: hidden;
}

.address-form-wrapper .save-address::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.address-form-wrapper .save-address:hover {
    background: linear-gradient(45deg, #2e9e8d, #217dbb);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 198, 169, 0.4);
}

.address-form-wrapper .save-address:hover::before {
    left: 100%;
}

.address-form-wrapper .save-address:active {
    transform: translateY(0);
}

/* Cancel Button */
.woocommerce .btn-outline-secondary {
    background: transparent;
    color: #6b7280;
    border: 2px solid #d1d5db;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.woocommerce .btn-outline-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #6b7280;
    transition: width 0.3s ease;
    z-index: -1;
}

.woocommerce .btn-outline-secondary:hover {
    color: white;
    border-color: #6b7280;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.woocommerce .btn-outline-secondary:hover::before {
    width: 100%;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e8f4f8;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Info Section */
.form-info {
    display: flex;
    align-items: center;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border-radius: 8px;
    border: 1px solid #bfdbfe;
    font-size: 0.9rem;
    color: #1e40af;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* .address-form-wrapper - Responsive styling removed */
    
    .address-form-wrapper .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .woocommerce button.button,
    .woocommerce .btn-outline-secondary {
        padding: 10px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* .address-form-wrapper - Responsive styling removed */
    
    .address-form-wrapper h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .address-form-wrapper input, 
    .address-form-wrapper select,
    .address-form-wrapper textarea {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .woocommerce button.button,
    .woocommerce .btn-outline-secondary {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Error States */
.address-form-wrapper .woocommerce-error,
.address-form-wrapper .woocommerce-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.address-form-wrapper .woocommerce-message {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

/* Loading States */
.woocommerce button.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.woocommerce button.button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(58, 198, 169, 0.3);
}
