/* Laravel Captcha Styles */

.captcha-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Image Captcha Styles */
.captcha-image-wrapper {
    max-width: 400px;
}

.captcha-image-container {
    position: relative;
    display: inline-block;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.captcha-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.captcha-refresh {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.captcha-refresh:hover {
    background: #fff;
    transform: rotate(180deg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.captcha-refresh svg {
    color: #333;
}

/* Input Styles */
.captcha-input-group {
    margin-top: 15px;
}

.captcha-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.captcha-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.captcha-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Math & Text Captcha Styles */
.captcha-math-wrapper,
.captcha-text-wrapper {
    max-width: 400px;
}

.captcha-question-container {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px 50px 25px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.captcha-question {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 2px;
}

/* Slider Captcha Styles */
.captcha-slider-wrapper {
    max-width: 400px;
}

.captcha-slider-container {
    position: relative;
}

.captcha-slider-background {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.captcha-slider-puzzle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.captcha-slider-track {
    position: relative;
    margin-top: 15px;
    height: 50px;
    background: #f0f0f0;
    border-radius: 25px;
    overflow: hidden;
    user-select: none;
}

.captcha-slider-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
    z-index: 2;
}

.captcha-slider-handle:active {
    cursor: grabbing;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.captcha-slider-text {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

/* Style Variations */

/* Modern Style */
.captcha-style-modern .captcha-image-container,
.captcha-style-modern .captcha-question-container {
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.captcha-style-modern .captcha-input {
    border-radius: 10px;
    border-width: 1px;
}

.captcha-style-modern .captcha-question-container {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Minimal Style */
.captcha-style-minimal .captcha-image-container,
.captcha-style-minimal .captcha-question-container {
    border-radius: 4px;
    box-shadow: none;
    border: 1px solid #ddd;
}

.captcha-style-minimal .captcha-input {
    border-radius: 4px;
}

.captcha-style-minimal .captcha-question-container {
    background: #f8f9fa;
}

.captcha-style-minimal .captcha-question {
    color: #333;
}

/* Colorful Style */
.captcha-style-colorful .captcha-question-container {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.captcha-style-colorful .captcha-input:focus {
    border-color: #fa709a;
    box-shadow: 0 0 0 3px rgba(250, 112, 154, 0.1);
}

.captcha-style-colorful .captcha-slider-handle {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* Success/Error States */
.captcha-input.success {
    border-color: #4CAF50;
    background-color: #f1f8f4;
}

.captcha-input.error {
    border-color: #f44336;
    background-color: #fef1f0;
}

/* Loading State */
.captcha-loading {
    opacity: 0.6;
    pointer-events: none;
}

.captcha-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
    .captcha-question {
        font-size: 18px;
    }
    
    .captcha-slider-background {
        width: 100% !important;
    }
}

Captcha Styles
.captcha-container {
    margin-bottom: 1rem;
}

.captcha-image, #captcha-svg svg {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: block;
    max-width: 100%;
    height: auto;
    background: white;
}

#captcha-svg {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.captcha-input-group {
    display: flex;
    gap: 0.5rem;
}

.captcha-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.captcha-refresh-btn {
    padding: 0.5rem 1rem;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.captcha-refresh-btn:hover {
    background-color: #5a6268;
}

.captcha-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
    .captcha-image {
        border-color: #495057;
    }
    
    .captcha-input {
        background-color: #343a40;
        border-color: #495057;
        color: #fff;
    }
    
    .captcha-input:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }
}

/* RTL Support */
[dir="rtl"] .captcha-input-group {
    direction: rtl;
}

[dir="rtl"] .captcha-refresh-btn {
    margin-left: 0;
    margin-right: 0.5rem;
}