/* PSE - Percepção Subjetiva de Esforço - Styles */
/* Updated: 2025-10-30 - Back button styling fix */

.pse-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pse-title {
    text-align: center;
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.pse-subtitle {
    text-align: center;
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 30px;
}

.pse-scale-container {
    margin: 30px 0;
}

.pse-scale-title {
    color: #34495e;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: center;
}

.pse-scale {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.pse-option {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pse-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.pse-option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 8px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    min-height: 80px;
    justify-content: center;
}

.pse-number {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.pse-description {
    font-size: 0.75rem;
    color: #7f8c8d;
    text-align: center;
    line-height: 1.2;
}

.pse-option:hover .pse-option-label {
    border-color: #3498db;
    background: #ecf0f1;
    transform: translateY(-2px);
}

.pse-option input[type="radio"]:checked ~ .pse-option-label {
    border-color: #e74c3c;
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.pse-option input[type="radio"]:checked ~ .pse-option-label .pse-number,
.pse-option input[type="radio"]:checked ~ .pse-option-label .pse-description {
    color: white;
}

.pse-comment-section {
    margin: 30px 0;
}

.pse-comment-label {
    display: block;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 10px;
}

.pse-comment-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
}

.pse-comment-textarea:focus {
    outline: none;
    border-color: #3498db;
}

.pse-submit-section {
    text-align: center;
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.pse-submit-button {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    text-decoration: none;
    display: inline-block;
}

.pse-submit-section .pse-back-button,
.pse-back-button {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 15px 40px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    min-width: 200px;
    text-decoration: none !important;
    display: inline-block !important;
    text-align: center !important;
    vertical-align: middle;
    box-sizing: border-box;
    line-height: 1.5;
    outline: none !important;
}

.pse-submit-section a.pse-back-button,
a.pse-back-button,
a.pse-back-button:link,
a.pse-back-button:hover,
a.pse-back-button:focus,
a.pse-back-button:active,
a.pse-back-button:visited {
    color: white !important;
    text-decoration: none !important;
}

.pse-submit-button:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.pse-back-button:hover,
a.pse-back-button:hover {
    background: #5a6268 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.pse-submit-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pse-alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.pse-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pse-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pse-container {
        margin: 10px;
        padding: 15px;
    }

    .pse-title {
        font-size: 1.5rem;
    }

    .pse-scale {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .pse-option-label {
        padding: 12px 6px;
        min-height: 70px;
    }

    .pse-number {
        font-size: 1.2rem;
    }

    .pse-description {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .pse-scale {
        grid-template-columns: repeat(1, 1fr);
        max-width: 300px;
        margin: 0 auto 30px;
    }

    .pse-option-label {
        flex-direction: row;
        text-align: left;
        justify-content: flex-start;
        min-height: 60px;
    }

    .pse-number {
        margin-right: 15px;
        margin-bottom: 0;
    }

    .pse-description {
        text-align: left;
        flex: 1;
    }

    .pse-submit-button,
    .pse-back-button {
        width: 100%;
        min-width: unset;
    }

    .pse-submit-section {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animation for selection */
@keyframes selectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pse-option input[type="radio"]:checked ~ .pse-option-label {
    animation: selectPulse 0.3s ease;
}