/**
 * AI Use-Case Review - BEM Styles
 * Version: 1.0.0
 * Analog zu usecase-bem.css mit Namespace .ai-review__
 */

/* === ROOT VARIABLES === */
:root {
  --ai-primary: #196297;
  --ai-primary-light: #2a7ec0;
  --ai-success: #059669;
  --ai-success-light: #34d399;
  --ai-secondary: #475569;
  --ai-secondary-light: #64748b;
  --ai-danger: #dc2626;
  --ai-danger-light: #ef4444;
  --ai-warning: #f59e0b;
  --ai-warning-light: #fbbf24;
}

/* === CONTAINER === */
.ai-review__container {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-top: 20px !important;
    margin-bottom: 20px !important;
    background: white !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    position: relative !important;
}

.ai-review__container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === HEADER === */
.ai-review__header {
    background: linear-gradient(135deg, #196297 0%, #2475b3 100%) !important;
    color: white !important;
    padding: 30px 40px !important;
    text-align: center !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
    border-radius: 15px 15px 0 0 !important;
    box-sizing: border-box !important;
}

.ai-review__header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.ai-review__header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* === CONTENT === */
.ai-review__content {
    padding: 40px !important;
    max-width: 1600px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

@media (min-width: 1920px) {
    .ai-review__header,
    .ai-review__content {
        padding: 50px 80px !important;
        max-width: 1800px !important;
    }
}

/* === SECTIONS === */
.ai-review__section {
    margin-bottom: 40px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.ai-review__section h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-review__section--input {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 6px solid #17a2b8;
}

.ai-review__section--result {
    background: linear-gradient(135deg, #f0fff4 0%, #e0ffe0 100%);
    border-left: 6px solid #51cf66;
}

/* === FORM ELEMENTS === */
.ai-review__form-group {
    margin-bottom: 25px;
}

.ai-review__label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.ai-review__input,
.ai-review__textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

.ai-review__input:focus,
.ai-review__textarea:focus {
    outline: none;
    border-color: #196297;
    box-shadow: 0 0 0 3px rgba(25, 98, 151, 0.1);
}

.ai-review__textarea {
    min-height: 150px;
    resize: vertical;
}

.ai-review__input--context {
    min-height: 100px;
}

.ai-review__input--usecase {
    min-height: 250px;
}

/* === DROPZONE === */
.ai-review__dropzone {
    border: 2px dashed #196297;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.ai-review__dropzone:hover {
    background: #e9ecef;
    border-color: #2475b3;
}

.ai-review__dropzone.active {
    background: #d4e9f2;
    border-color: #2475b3;
    transform: scale(1.02);
}

.ai-review__dropzone-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #196297;
}

.ai-review__dropzone-text {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 10px;
}

.ai-review__dropzone-hint {
    font-size: 0.9rem;
    color: #6c757d;
}

.ai-review__file-input {
    display: none;
}

.ai-review__file-info {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    display: none;
}

.ai-review__file-info.show {
    display: block;
}

.ai-review__file-name {
    font-weight: 600;
    color: #196297;
    margin-bottom: 5px;
}

.ai-review__file-size {
    font-size: 0.9rem;
    color: #6c757d;
}

.ai-review__file-remove {
    margin-top: 10px;
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.ai-review__file-remove:hover {
    background: #c82333;
}

/* === BUTTONS === */
.ai-review__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    font-size: 1rem;
}

.ai-review__btn--primary {
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-primary-light));
}

.ai-review__btn--success {
    background: linear-gradient(135deg, var(--ai-success), var(--ai-success-light));
}

.ai-review__btn--secondary {
    background: linear-gradient(135deg, var(--ai-secondary), var(--ai-secondary-light));
}

.ai-review__btn--danger {
    background: linear-gradient(135deg, var(--ai-danger), var(--ai-danger-light));
}

.ai-review__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

.ai-review__btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.ai-review__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.ai-review__btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ai-review__btn-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

/* === LOADING ANIMATION === */
.ai-review__loading {
    display: none;
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f2 100%);
    border-radius: 12px;
    margin: 20px 0;
}

.ai-review__loading.show {
    display: block;
}

.ai-review__loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #196297;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.ai-review__loading-text {
    font-size: 1.2rem;
    color: #196297;
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* === RESULT DISPLAY === */
.ai-review__result {
    display: none;
    margin-top: 30px;
}

.ai-review__result.show {
    display: block;
}

.ai-review__result-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    line-height: 1.8;
}

.ai-review__result-content h2 {
    color: #196297;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.ai-review__result-content h2:first-child {
    margin-top: 0;
}

.ai-review__result-content h3 {
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
}

.ai-review__result-content p {
    margin-bottom: 15px;
    color: #495057;
}

.ai-review__result-content ul,
.ai-review__result-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.ai-review__result-content li {
    margin-bottom: 8px;
    color: #495057;
}

.ai-review__result-content strong {
    color: #2c3e50;
}

/* Stars */
.ai-review__stars {
    display: inline-block;
    color: #fbbf24;
    font-size: 1.2rem;
    margin-left: 10px;
}

/* === ACTIONS === */
.ai-review__actions {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* === ERROR MESSAGE === */
.ai-review__error {
    padding: 20px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #f87171;
    color: #7f1d1d;
    border-radius: 12px;
    margin: 20px 0;
    display: none;
}

.ai-review__error.show {
    display: block;
}

.ai-review__error-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.ai-review__error-message {
    font-weight: 600;
    font-size: 1.1rem;
}

/* === INFO BOX === */
.ai-review__info {
    background: #e8f4f8;
    padding: 20px;
    border-radius: 12px;
    border-left: 5px solid #196297;
    margin: 20px 0;
}

.ai-review__info h3 {
    color: #196297;
    margin-bottom: 10px;
}

.ai-review__info p {
    color: #495057;
    margin-bottom: 8px;
    line-height: 1.6;
}

.ai-review__info ul {
    list-style: none;
    padding: 0;
}

.ai-review__info li {
    padding: 5px 0;
    padding-left: 25px;
    position: relative;
}

.ai-review__info li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #196297;
    font-weight: bold;
}

/* === PRIVACY NOTICE === */
.ai-review__privacy {
    background: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid #f59e0b;
    margin: 20px 0;
    font-size: 0.9rem;
    color: #856404;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .ai-review__container {
        width: 100vw !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 0 !important;
    }

    .ai-review__header,
    .ai-review__content {
        padding: 15px !important;
        max-width: 100% !important;
    }
    
    .ai-review__header {
        border-radius: 0 !important;
    }

    .ai-review__header h1 {
        font-size: 1.8rem !important;
    }

    .ai-review__btn-group {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .ai-review__btn {
        width: 100%;
        justify-content: center;
    }

    .ai-review__dropzone {
        padding: 20px;
    }

    .ai-review__dropzone-icon {
        font-size: 2rem;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .ai-review__header,
    .ai-review__content {
        max-width: 100% !important;
        padding: 30px !important;
    }
}

/* === TOKEN COUNTER === */
.ai-review__token-counter {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6c757d;
    text-align: right;
}

.ai-review__token-counter.warning {
    color: #f59e0b;
    font-weight: 600;
}

.ai-review__token-counter.error {
    color: #dc2626;
    font-weight: 600;
}
