/* Compact Mobile-First Unsubscribe Page */
.unsubscribe-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    padding: 20px 0;
}

.unsubscribe-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.unsubscribe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.form-control {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.input-group-text {
    border: 1px solid #dee2e6;
    border-right: none;
    border-radius: 8px 0 0 8px;
    background-color: #f8f9fa;
    padding: 0.5rem 0.75rem;
}

.input-group .form-control:focus {
    border-color: #667eea;
}

.input-group .form-control:focus + .input-group-text,
.input-group-text:has(+ .form-control:focus) {
    border-color: #667eea;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    background: linear-gradient(135deg, #c82333, #dc3545);
}

.btn-outline-secondary {
    border: 1px solid #6c757d;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 400;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: translateY(-1px);
}

.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.alert-success {
    background-color: #d1f2eb;
    color: #0c5460;
    border-left: 3px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 3px solid #dc3545;
}

.alert-info {
    background-color: #cce7ff;
    color: #004085;
    border-left: 3px solid #007bff;
}

/* Compact loading state */
.btn[data-loading="true"] {
    position: relative;
    color: transparent;
}

.btn[data-loading="true"]::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile-first responsive design */
@media (max-width: 576px) {
    .unsubscribe-section {
        padding: 15px;
        min-height: calc(100vh - 100px);
    }
    
    .unsubscribe-card {
        padding: 1.5rem;
        border-radius: 12px;
        margin: 0;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .form-control, .input-group-text {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .unsubscribe-card {
        padding: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Compact info section */
.border-top {
    border-color: #e9ecef !important;
    border-width: 1px !important;
}

.text-primary {
    color: #667eea !important;
}

/* Turnstile widget responsive */
.cf-turnstile {
    margin: 0 auto;
    max-width: 100%;
    transform-origin: center;
}

@media (max-width: 576px) {
    .cf-turnstile {
        transform: scale(0.9);
    }
}

/* Form validation - mobile optimized */
.was-validated .form-control:invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid {
    border-color: #28a745;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Accessibility and smooth transitions */
.btn:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

* {
    transition: all 0.15s ease;
}

/* Form validation styles */
.was-validated .form-control:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Turnstile widget container */
.cf-turnstile {
    margin: 0 auto;
}

/* Info section styling */
.border-top {
    border-color: #e9ecef !important;
}

.text-primary {
    color: #667eea !important;
}

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.2s ease;
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

/* Hover effects for info icons */
.fas:hover {
    transform: scale(1.1);
}