/**
 * Inspector-IQ Age Decoder Styles
 */

/* Container */
.iiqad-decoder-wrap {
    max-width: 500px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.iiqad-decoder {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Dark theme */
.iiqad-decoder-wrap[data-theme="dark"] .iiqad-decoder {
    background: #1a1a2e;
    border-color: #2d2d44;
    color: #e0e0e0;
}

/* Title */
.iiqad-title {
    margin: 0 0 20px 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #1a1a2e;
    text-align: center;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-title {
    color: #ffffff;
}

/* Form fields */
.iiqad-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.iiqad-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.iiqad-field label {
    font-size: 0.9em;
    font-weight: 500;
    color: #444;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-field label {
    color: #b0b0b0;
}

/* Select and Input */
.iiqad-select,
.iiqad-input {
    padding: 12px 14px;
    font-size: 1em;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    background: #ffffff;
    color: #333;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.iiqad-select:focus,
.iiqad-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.iiqad-select:disabled,
.iiqad-input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-select,
.iiqad-decoder-wrap[data-theme="dark"] .iiqad-input {
    background: #2d2d44;
    border-color: #404060;
    color: #e0e0e0;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-select:disabled,
.iiqad-decoder-wrap[data-theme="dark"] .iiqad-input:disabled {
    background: #1f1f35;
    color: #666;
}

/* Button */
.iiqad-button {
    padding: 14px 20px;
    font-size: 1em;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #0066cc, #0052a3);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.iiqad-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #0077ee, #0066cc);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.iiqad-button:active:not(:disabled) {
    transform: translateY(0);
}

.iiqad-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-button:disabled {
    background: #404060;
    color: #888;
}

/* Result box */
.iiqad-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 6px;
    animation: iiqad-fadeIn 0.3s ease;
}

@keyframes iiqad-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.iiqad-result.success {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 1px solid #a5d6a7;
}

.iiqad-result.info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 1px solid #90caf9;
}

.iiqad-result.warning {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 1px solid #ffcc80;
}

.iiqad-result.error {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border: 1px solid #ef9a9a;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-result.success {
    background: linear-gradient(135deg, #1b3d1b, #2d4a2d);
    border-color: #4caf50;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-result.info {
    background: linear-gradient(135deg, #1a2d3d, #2d3d4a);
    border-color: #2196f3;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-result.warning {
    background: linear-gradient(135deg, #3d2d1a, #4a3d2d);
    border-color: #ff9800;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-result.error {
    background: linear-gradient(135deg, #3d1a1a, #4a2d2d);
    border-color: #f44336;
}

/* Result content */
.iiqad-result-content {
    font-size: 1em;
    line-height: 1.6;
}

.iiqad-result-content strong {
    font-weight: 600;
}

.iiqad-result-age {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    font-size: 1.1em;
    font-weight: 600;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-result-age {
    background: rgba(255, 255, 255, 0.1);
}

.iiqad-result-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
    color: #666;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-result-note {
    border-color: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

/* Link button */
.iiqad-link-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: #0066cc;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.iiqad-link-btn:hover {
    background: #0052a3;
    text-decoration: none;
    color: #ffffff !important;
}

/* Footer */
.iiqad-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 0.85em;
    color: #888;
}

.iiqad-footer a {
    color: #0066cc;
    text-decoration: none;
}

.iiqad-footer a:hover {
    text-decoration: underline;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-footer {
    border-color: #2d2d44;
    color: #666;
}

.iiqad-decoder-wrap[data-theme="dark"] .iiqad-footer a {
    color: #5c9eff;
}

/* Loading spinner */
.iiqad-loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: iiqad-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Confidence indicator */
.iiqad-confidence {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.iiqad-confidence.high {
    background: #4caf50;
    color: white;
}

.iiqad-confidence.medium {
    background: #ff9800;
    color: white;
}

.iiqad-confidence.low {
    background: #f44336;
    color: white;
}

/* Responsive */
@media (max-width: 600px) {
    .iiqad-decoder-wrap {
        margin: 10px;
        max-width: none;
    }
    
    .iiqad-decoder {
        padding: 16px;
    }
    
    .iiqad-title {
        font-size: 1.3em;
    }
}
