/**
 * Bot Protection Styles
 *
 * Styles for the reCAPTCHA contact protection system
 *
 * @package Tutor_Progress_Tracker
 * @since   1.1.1
 */

/* Protected Content - Hidden State */
.tpt-protected-content.tpt-hidden {
    display: none !important;
}

/* Contact Protected Link - Button State */
.tpt-contact-protected {
    padding: 20px;
    text-align: center;
}

/* Ensure instructor cards align buttons at bottom */
.elementor-widget-icon-list {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.elementor-widget-icon-list .elementor-widget-container {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.elementor-column .elementor-widget-wrap {
    display: flex !important;
    flex-direction: column !important;
}

/* Push button wrapper to bottom, but not normal contact info */
.elementor-widget-icon-list .tpt-contact-protected {
    margin-top: auto;
}

.tpt-unlock-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #6BB2E2 !important;
    color: #ffffff !important;
    border: 2px solid #6BB2E2 !important;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tpt-unlock-link:hover {
    background: #1B3668 !important;
    border-color: #1B3668 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.tpt-unlock-link .tpt-icon {
    font-size: 18px;
}

/* Smaller inline version for Jet Engine fields */
.tpt-jet-protected {
    display: inline-block;
}

.tpt-unlock-small {
    padding: 6px 12px !important;
    font-size: 14px !important;
    gap: 6px !important;
}

.tpt-unlock-small .tpt-icon {
    font-size: 14px !important;
}

/* Modal Styles */
.tpt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.tpt-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.tpt-modal-content {
    position: relative;
    max-width: 500px;
    margin: 10vh auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.tpt-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent !important;
    border: none !important;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    color: #666 !important;
    transition: color 0.2s;
    padding: 0;
    width: 45px;
    height: 45px;
}

.tpt-modal-close:hover {
    color: #000 !important;
}

.tpt-modal-content h2 {
    margin: 0 0 15px 0;
    color: #1B3668;
    font-size: 24px;
}

/* Instruction Text */
.tpt-instruction-text {
    color: #1B3668;
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

/* reCAPTCHA Container */
.tpt-recaptcha-container {
    display: inline-block;
    margin: 0 auto 15px;
    background: #ffffff;
    padding: 10px;
    border: 1px solid #CDE4F3;
    border-radius: 6px;
}

/* Verify Button */
.tpt-verify-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #6BB2E2 !important;
    color: #ffffff !important;
    border: 2px solid #6BB2E2 !important;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tpt-verify-button:hover:not(:disabled) {
    background: #1B3668 !important;
    border-color: #1B3668 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.tpt-verify-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.tpt-verify-button .tpt-icon {
    font-size: 18px;
}

/* Loading Spinner */
.tpt-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: tpt-spin 0.6s linear infinite;
}

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

/* Error Message */
.tpt-error-message {
    margin-top: 12px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #dc2626;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

/* Verified Content Animation */
.tpt-verified {
    animation: tpt-fade-in 0.4s ease-in-out;
}

@keyframes tpt-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tpt-contact-overlay {
        padding: 15px;
        margin: 10px 0;
    }
    
    .tpt-reveal-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .tpt-reveal-button {
        background: #1f2937;
        color: #a5b4fc;
    }
    
    .tpt-reveal-button:hover:not(:disabled) {
        background: #374151;
    }
    
    .tpt-error-message {
        background: rgba(31, 41, 55, 0.95);
        color: #fca5a5;
    }
}

/* Integration with Elementor Icon List */
.elementor-widget-icon-list.tpt-protected-content.tpt-hidden + .tpt-contact-overlay {
    margin-top: -10px;
}

/* Ensure proper spacing in grid layouts */
.elementor-widget-container > .tpt-contact-overlay {
    margin-top: 0;
}

/* Instructor Card Alignment - Equal Height Containers */
.page-id-2540 .elementor-2755 .elementor-element.elementor-widget-icon-list {
    display: flex;
    flex-direction: column;
}

.page-id-2540 .elementor-2755 .elementor-widget-icon-list .elementor-widget-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* For grid/column layouts - align icon lists to bottom */
.elementor-column .elementor-widget-icon-list {
    height: 100%;
}
