/**
 * CD Code Generation Public Styles
 *
 * @package cd-code-generation
 * @since 1.0.0
 */

/* ==========================================================================
   Code Validation Form
   ========================================================================== */

.cd-code-validation-wrapper {
    padding: 40px 20px;
    max-width: 100%;
}

.cd-code-validation-container {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.cd-code-title {
    text-align: center;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.cd-code-description {
    text-align: center;
    margin-bottom: 30px;
}

.cd-code-description p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.cd-code-form {
    width: 100%;
}

.cd-code-input-wrapper {
    margin-bottom: 25px;
}

.cd-code-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.3s ease;
    background: #f9f9f9;
    box-sizing: border-box;
}

.cd-code-input:focus {
    outline: none;
    border-color: #007cba;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.cd-code-input::placeholder {
    font-family: system-ui, -apple-system, sans-serif;
    letter-spacing: normal;
    text-transform: none;
    color: #999;
}

.cd-code-hint {
    display: block;
    margin-top: 8px;
    color: #999;
    font-size: 13px;
    text-align: center;
}

.cd-code-submit-btn {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cd-code-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.cd-code-submit-btn:active {
    transform: translateY(0);
}

.cd-code-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.cd-code-btn-text {
    display: inline-block;
}

.cd-code-spinner {
    display: none;
    font-size: 20px;
}

/* ==========================================================================
   Result Messages
   ========================================================================== */

.cd-code-result {
    margin-top: 25px;
    padding: 20px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.6;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cd-code-result.cd-code-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.cd-code-result.cd-code-success::before {
    content: "✓ ";
    font-size: 20px;
    font-weight: bold;
}

.cd-code-result.cd-code-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.cd-code-result.cd-code-error::before {
    content: "✗ ";
    font-size: 20px;
    font-weight: bold;
}

.cd-code-result p {
    margin: 0;
}

/* ==========================================================================
   Loading State
   ========================================================================== */

.cd-code-submit-btn.loading {
    pointer-events: none;
}

.cd-code-submit-btn.loading .cd-code-btn-text {
    display: none;
}

.cd-code-submit-btn.loading .cd-code-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media screen and (max-width: 768px) {
    .cd-code-validation-container {
        padding: 30px 25px;
    }

    .cd-code-title {
        font-size: 24px;
    }

    .cd-code-description p {
        font-size: 14px;
    }

    .cd-code-input {
        font-size: 16px;
        padding: 12px 15px;
    }

    .cd-code-submit-btn {
        font-size: 16px;
        padding: 14px 25px;
    }
}

@media screen and (max-width: 480px) {
    .cd-code-validation-wrapper {
        padding: 20px 10px;
    }

    .cd-code-validation-container {
        padding: 25px 20px;
    }

    .cd-code-title {
        font-size: 22px;
    }

    .cd-code-input {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .cd-code-submit-btn {
        font-size: 15px;
    }
}

/* ==========================================================================
   Alternative Dark Theme (Optional)
   ========================================================================== */

.cd-code-validation-dark .cd-code-validation-container {
    background: #2c3e50;
    color: #ecf0f1;
}

.cd-code-validation-dark .cd-code-title {
    color: #ecf0f1;
}

.cd-code-validation-dark .cd-code-description p {
    color: #bdc3c7;
}

.cd-code-validation-dark .cd-code-input {
    background: #34495e;
    border-color: #34495e;
    color: #ecf0f1;
}

.cd-code-validation-dark .cd-code-input:focus {
    background: #2c3e50;
    border-color: #3498db;
}

.cd-code-validation-dark .cd-code-hint {
    color: #95a5a6;
}
