/* Circourt Poll Popup - Lanvin Inspired Design */

/* Overlay */
.circourt-poll-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 20px;
    backdrop-filter: blur(2px);
}

/* Main popup container */
.circourt-poll-popup {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Slide in animation */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close button */
.circourt-poll-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
    color: #666;
    transition: color 0.2s ease;
}

.circourt-poll-close:hover {
    color: #000;
}

.circourt-poll-close svg {
    width: 18px;
    height: 18px;
}

/* Content area */
.circourt-poll-content {
    padding: 40px 30px 30px;
}

/* Title */
.circourt-poll-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
    margin: 0 0 20px;
    color: #000;
    text-transform: uppercase;
}

/* Description */
.circourt-poll-description {
    text-align: center;
    margin-bottom: 30px;
}

.circourt-poll-description p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
    font-weight: 300;
}

/* Form */
.circourt-poll-form {
    width: 100%;
}

/* Poll options */
.circourt-poll-options {
    margin-bottom: 25px;
}

/* Civility options inline for newsletter mode */
.circourt-poll-civility-inline {
    display: flex;
    gap: 1.5rem;
    margin: 0 0 1.5rem 0;
    flex-wrap: wrap;
}

.circourt-poll-civility-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    font-weight: 400;
}

.circourt-poll-civility-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

/* Privacy text styling for newsletter mode */
.circourt-poll-privacy-text {
    font-size: 14px;
    line-height: 1.4;
    color: #666;
    font-weight: 300;
    text-align: left;
    margin: 0;
    flex: 1;
}

.circourt-poll-privacy-text a {
    color: #666;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.circourt-poll-privacy-text a:hover {
    color: #333;
}

.circourt-poll-option {
    margin-bottom: 20px;
}

.circourt-poll-option-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
}

/* Custom radio button */
.circourt-poll-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.circourt-poll-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    margin-right: 15px;
    margin-top: 2px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.circourt-poll-radio:checked + .circourt-poll-radio-custom {
    border-color: #000;
}

.circourt-poll-radio:checked + .circourt-poll-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Option content */
.circourt-poll-option-content {
    flex: 1;
    min-width: 0;
}

.circourt-poll-option-title {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    display: block;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.circourt-poll-option-description {
    font-size: 12px;
    line-height: 1.5;
    color: #666;
    margin: 0;
    font-weight: 300;
}

/* Form footer */
.circourt-poll-form-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* Email input */
.circourt-poll-email-group {
    width: 100%;
}

.circourt-poll-email-input {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color 0.2s ease;
}

.circourt-poll-email-input:focus {
    border-bottom-color: #000;
}

.circourt-poll-email-input::placeholder {
    color: #999;
    font-weight: 300;
}

/* Submit button */
.circourt-poll-submit-btn {
    width: 100%;
    padding: 15px 20px;
    background-color: #000 !important;
    color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.circourt-poll-submit-btn:hover {
    background-color: #333;
}

.circourt-poll-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.circourt-poll-btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.circourt-poll-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Privacy text */
.circourt-poll-privacy {
    text-align: left;
    margin-bottom: 20px;
}

.circourt-poll-privacy label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.circourt-poll-privacy p {
    font-size: 11px;
    line-height: 1.4;
    color: #999;
    margin: 0;
    font-weight: 300;
}

.circourt-poll-privacy input[type="checkbox"] {
    margin: 2px 0 0 0;
    flex-shrink: 0;
}

/* Success message */
.circourt-poll-success {
    text-align: center;
    padding: 20px 0;
}

.circourt-poll-success-icon {
    margin-bottom: 15px;
    color: #28a745;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circourt-poll-success h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 10px;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.circourt-poll-success p {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 300;
}

/* Error message */
.circourt-poll-error {
    text-align: center;
    padding: 20px 0;
}

.circourt-poll-error-icon {
    margin-bottom: 15px;
    color: #dc3545;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circourt-poll-error h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 10px;
    color: #dc3545;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.circourt-poll-error p {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px;
    font-weight: 300;
}

.circourt-poll-retry-btn {
    padding: 10px 20px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.circourt-poll-retry-btn:hover {
    background-color: #c82333;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .circourt-poll-overlay {
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }
    
    .circourt-poll-popup {
        max-width: 100%;
        width: 100%;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
        animation: slideInUp 0.3s ease-out;
    }
    
    .circourt-poll-content {
        padding: 30px 20px 20px;
    }
    
    .circourt-poll-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .circourt-poll-description {
        margin-bottom: 25px;
    }
    
    .circourt-poll-option-title {
        font-size: 13px;
    }
    
    .circourt-poll-option-description {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .circourt-poll-content {
        padding: 25px 15px 15px;
    }
    
    .circourt-poll-title {
        font-size: 18px;
    }
    
    .circourt-poll-description p {
        font-size: 13px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .circourt-poll-radio-custom {
        border-width: 3px;
    }
    
    .circourt-poll-email-input {
        border-bottom-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .circourt-poll-popup {
        animation: none;
    }
    
    .circourt-poll-spinner {
        animation: none;
    }
    
    * {
        transition: none !important;
    }
}

/* Dark mode support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .circourt-poll-popup {
        background: #1a1a1a;
        color: #fff;
    }
    
    .circourt-poll-title,
    .circourt-poll-option-title {
        color: #fff;
    }
    
    .circourt-poll-description p,
    .circourt-poll-option-description,
    .circourt-poll-privacy p {
        color: #ccc;
    }
    
    .circourt-poll-email-input {
        color: #fff;
        border-bottom-color: #666;
    }
    
    .circourt-poll-email-input:focus {
        border-bottom-color: #fff;
    }
    
    .circourt-poll-email-input::placeholder {
        color: #999;
    }
    
    .circourt-poll-radio-custom {
        border-color: #666;
    }
    
    .circourt-poll-radio:checked + .circourt-poll-radio-custom {
        border-color: #fff;
    }
    
    .circourt-poll-radio:checked + .circourt-poll-radio-custom::after {
        background-color: #fff;
    }
    
    .circourt-poll-submit-btn {
        background-color: #fff;
        color: #000;
    }
    
    .circourt-poll-submit-btn:hover {
        background-color: #f0f0f0;
    }
}