/* ========================================
   Encuesta de Satisfacción - Estilos
   Ecopetrol Brand Colors
======================================== */

:root {
    --ecopetrol-blue: #003366;
    --ecopetrol-green: #00A859;
    --ecopetrol-dark: #1F1D37;
    --ecopetrol-purple: #512D72;
    --star-empty: #d1d5db;
    --star-filled: #fbbf24;
    --star-hover: #f59e0b;
}

/* ========================================
   Survey Container
======================================== */

.survey-container {
    padding: 2rem 0;
    animation: fadeIn 0.5s ease-in;
}

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

.survey-header {
    margin-bottom: 2rem;
}

.survey-logo {
    max-width: 300px;
    height: auto;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Survey Card
======================================== */

.survey-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.survey-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.survey-card-header {
    background: linear-gradient(135deg, var(--ecopetrol-blue) 0%, var(--ecopetrol-green) 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: #ffffff;
}

.survey-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.survey-subtitle {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.95;
}

.survey-card-body {
    padding: 2.5rem 2rem;
}

.survey-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 2rem;
    text-align: center;
}

/* ========================================
   Survey Questions
======================================== */

.survey-question {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.03), rgba(0, 168, 89, 0.03));
    border-radius: 15px;
    border-left: 4px solid var(--ecopetrol-green);
    transition: all 0.3s ease;
}

.survey-question:hover {
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.05), rgba(0, 168, 89, 0.05));
    transform: translateX(5px);
}

.question-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--ecopetrol-dark);
    display: block;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.question-number {
    display: inline-block;
    background: var(--ecopetrol-green);
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 0.5rem;
    font-weight: bold;
}

.required-indicator {
    color: #e53e3e;
    font-weight: bold;
    margin-left: 0.25rem;
}

/* ========================================
   Star Rating System
======================================== */

.star-rating {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 1rem 0;
}

.star {
    font-size: 3rem;
    cursor: pointer;
    filter: grayscale(100%);
    opacity: 0.4;
    transition: all 0.3s ease;
    user-select: none;
    display: inline-block;
}

.star:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.2) rotate(10deg);
}

.star.active {
    filter: grayscale(0%);
    opacity: 1;
    animation: starPulse 0.5s ease;
}

.star.hovered {
    filter: grayscale(0%);
    opacity: 0.8;
    transform: scale(1.1);
}

@keyframes starPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3) rotate(15deg);
    }
    100% {
        transform: scale(1);
    }
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 0.5rem;
}

.rating-label-left,
.rating-label-right {
    padding: 0 1rem;
}

/* ========================================
   Textarea
======================================== */

.survey-textarea {
    width: 100%;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 120px;
}

.survey-textarea:focus {
    outline: none;
    border-color: var(--ecopetrol-green);
    box-shadow: 0 0 0 3px rgba(0, 168, 89, 0.1);
}

.character-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* ========================================
   Submit Button
======================================== */

.btn-submit {
    background: linear-gradient(135deg, var(--ecopetrol-blue) 0%, var(--ecopetrol-green) 100%);
    color: #ffffff;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-loading {
    display: inline-block;
}

/* ========================================
   Validation Messages
======================================== */

.invalid-feedback {
    display: block;
    color: #e53e3e;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #fee;
    border-radius: 5px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.survey-question.has-error {
    border-left-color: #e53e3e;
    background: rgba(239, 68, 68, 0.05);
}

/* ========================================
   Thank You Screen
======================================== */

.thank-you-screen {
    background: #ffffff;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.thank-you-icon {
    font-size: 5rem;
    color: var(--ecopetrol-green);
    margin-bottom: 1.5rem;
    animation: checkBounce 1s ease;
}

@keyframes checkBounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
}

.thank-you-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--ecopetrol-blue);
    margin-bottom: 1rem;
}

.thank-you-message {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.celebration-emojis {
    font-size: 3rem;
    margin: 2rem 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ========================================
   Responsive Design
======================================== */

@media (max-width: 768px) {
    .survey-title {
        font-size: 1.5rem;
    }
    
    .survey-subtitle {
        font-size: 1rem;
    }
    
    .survey-card-header {
        padding: 2rem 1.5rem;
    }
    
    .survey-card-body {
        padding: 2rem 1.5rem;
    }
    
    .survey-question {
        padding: 1rem;
    }
    
    .question-label {
        font-size: 1rem;
    }
    
    .star {
        font-size: 2rem;
    }
    
    .star-rating {
        gap: 0.3rem;
    }
    
    .btn-submit {
        padding: 0.875rem 2rem;
        font-size: 1rem;
        width: 100%;
    }
    
    .thank-you-title {
        font-size: 1.75rem;
    }
    
    .thank-you-message {
        font-size: 1rem;
    }
    
    .rating-labels {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .survey-logo {
        max-width: 200px;
    }
    
    .star {
        font-size: 1.75rem;
    }
    
    .question-number {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 0.9rem;
    }
}

/* ========================================
   Loading State
======================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    color: #ffffff;
    font-size: 2rem;
}
