/**
 * Blink Form - Frontend Styles
 * Adapts to current theme while maintaining consistent appearance
 */

.blink-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.blink-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.blink-form-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin-bottom: 10px;
}

.blink-form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    /* Hide labels - using placeholders instead */
    display: none;
}

.blink-form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.blink-form-icon {
    position: absolute;
    right: 0;
    pointer-events: none;
    opacity: 0.4;
}

.blink-form-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.blink-form input[type="text"],
.blink-form input[type="email"],
.blink-form input[type="tel"],
.blink-form input[type="datetime-local"] {
    width: 100%;
    padding: 12px 35px 12px 0;
    border: none;
    border-bottom: 1px solid #d1d5db;
    border-radius: 0;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: transparent;
}

.blink-form input[type="text"]:focus,
.blink-form input[type="email"]:focus,
.blink-form input[type="tel"]:focus,
.blink-form input[type="datetime-local"]:focus {
    outline: none;
    border-bottom-color: #3b82f6;
    border-bottom-width: 2px;
}

.blink-form input.error {
    border-bottom-color: #ef4444;
    border-bottom-width: 2px;
}

.blink-form-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 4px;
    display: none;
}

.blink-form-error.visible {
    display: block;
}

.blink-form-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.blink-form input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.blink-form-checkbox-label {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.blink-form-disclaimer {
    font-size: 13px;
    line-height: 1.6;
    color: #6b7280;
    padding: 12px;
    background: #f9fafb;
    border-radius: 4px;
}

.blink-form-disclaimer a {
    color: #3b82f6;
    text-decoration: none;
}

.blink-form-disclaimer a:hover {
    text-decoration: underline;
}

.blink-form-recaptcha {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.blink-form-submit {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.blink-form-submit:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.blink-form-submit:active {
    transform: translateY(0);
}

.blink-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.blink-form-message {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.3s ease-out;
    position: relative;
    z-index: 99999 !important;
}

.blink-form-message.visible {
    display: block !important;
}

.blink-form-message.success {
    background: #10b981 !important;
    color: #ffffff !important;
    border: 2px solid #059669 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.blink-form-message.error {
    background: #ef4444 !important;
    color: #ffffff !important;
    border: 2px solid #dc2626 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blink-form-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: blink-spin 0.6s linear infinite;
    margin-right: 8px;
}

@keyframes blink-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .blink-form-container {
        padding: 15px;
    }

    .blink-form input[type="text"],
    .blink-form input[type="email"],
    .blink-form input[type="tel"],
    .blink-form input[type="datetime-local"] {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blink-form-container {
        padding: 15px;
    }

    .blink-form input[type="text"],
    .blink-form input[type="email"],
    .blink-form input[type="tel"],
    .blink-form input[type="datetime-local"] {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .blink-form-submit {
        padding: 14px 24px;
    }
}

/* Webinar Form Specific Styles */
.blink-webinar-form {
    background: transparent;
    padding: 0;
    max-width: 100%;
}

.blink-webinar-form .blink-form {
    gap: 20px;
}

.blink-webinar-form .blink-form-field {
    margin-bottom: 0;
}

.blink-webinar-form .blink-form-label {
    display: none;
}

.blink-webinar-form input[type="text"],
.blink-webinar-form input[type="email"],
.blink-webinar-form input[type="datetime-local"] {
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 16px;
    padding: 14px 40px 14px 0;
    transition: all 0.3s ease;
}

.blink-webinar-form input[type="text"]::placeholder,
.blink-webinar-form input[type="email"]::placeholder,
.blink-webinar-form input[type="datetime-local"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

.blink-webinar-form input[type="text"]:focus,
.blink-webinar-form input[type="email"]:focus,
.blink-webinar-form input[type="datetime-local"]:focus {
    border-bottom-color: #ffffff;
    outline: none;
}

/* Datetime input specific styles for webinar form */
.blink-webinar-form input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.7;
}

.blink-webinar-form input[type="datetime-local"]::-webkit-datetime-edit {
    color: rgba(255, 255, 255, 0.6);
}

.blink-webinar-form input[type="datetime-local"]:focus::-webkit-datetime-edit {
    color: #ffffff;
}

/* Icon colors for webinar form */
.blink-webinar-form .blink-form-icon svg path,
.blink-webinar-form .blink-form-icon svg circle {
    fill: rgba(255, 255, 255, 0.6);
}

/* Submit button for webinar form */
.blink-webinar-form .blink-form-submit {
    background: #5B8FE5;
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.blink-webinar-form .blink-form-submit:hover {
    background: #4A7FD5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.blink-webinar-form .blink-form-submit:active {
    transform: translateY(0);
}

/* Error messages for webinar form */
.blink-webinar-form .blink-form-error {
    color: #FFC9C9;
    font-size: 13px;
    margin-top: 6px;
}

/* Success/Error message styling for webinar form */
.blink-webinar-form .blink-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.blink-webinar-form .blink-form-message.success {
    background: rgba(74, 222, 128, 0.2);
    color: #ffffff;
    border: 1px solid rgba(74, 222, 128, 0.4);
    display: block;
}

.blink-webinar-form .blink-form-message.error {
    background: rgba(248, 113, 113, 0.2);
    color: #ffffff;
    border: 1px solid rgba(248, 113, 113, 0.4);
    display: block;
}

/* Loading state for webinar form */
.blink-webinar-form .blink-form-submit-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.blink-webinar-form .blink-form-spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

    to {
        transform: rotate(360deg);
    }
}

/* Autofill styling for webinar form */
.blink-webinar-form input:-webkit-autofill,
.blink-webinar-form input:-webkit-autofill:hover,
.blink-webinar-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px transparent inset;
    transition: background-color 5000s ease-in-out 0s;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}