/* 
   CT Ecoturismo Stylesheet
   Identity: Green theme (#2E7D32) and Orange Accents (#E65100)
*/

:root {
    --primary-color: #2E7D32;
    --primary-hover: #1b5e20;
    --secondary-color: #E65100;
    --secondary-hover: #bf360c;
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    font-family: var(--font-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Public Header */
.public-header {
    background-color: var(--card-bg);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.public-logo {
    max-height: 60px;
    width: auto;
}

/* Public Content */
.public-content {
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Linktree Page */
.linktree-container {
    text-align: center;
    padding: 20px 0;
}

.linktree-profile {
    margin-bottom: 30px;
}

.linktree-avatar {
    max-width: 150px;
    height: auto;
    object-fit: contain;
    margin-bottom: 15px;
}

.linktree-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.linktree-bio {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 5px;
}

.linktree-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.linktree-card {
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
    text-align: left;
    transition: var(--transition);
}

.linktree-card:hover {
    transform: translateY(-2px);
    border-color: var(--link-color, var(--primary-color));
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.linktree-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #F1F5F9;
    color: var(--link-color, var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 16px;
}

.linktree-text {
    flex: 1;
}

.linktree-link-title {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}

.linktree-link-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Wizard / Forms Containers */
.wizard-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.wizard-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.wizard-header h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 22px;
}

.wizard-header p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 5px;
}

/* Steps Progress Indicator */
.steps-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    position: relative;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.steps-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}

.steps-progress .step {
    position: relative;
    z-index: 2;
    background-color: var(--bg-color);
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.steps-progress .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
}

.steps-progress .step-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 5px;
}

.steps-progress .step.active .step-num {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.steps-progress .step.active .step-label {
    color: var(--primary-color);
    font-weight: 700;
}

.steps-progress .step.complete .step-num {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Forms Elements */
.wizard-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 10px;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
}

.required {
    color: #ef4444;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--text-dark);
    outline: none;
    background-color: #FCFDFE;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-lg {
    padding: 14px 30px;
    font-size: 16px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-dark);
}

.btn-outline:hover {
    background-color: #F1F5F9;
    border-color: var(--text-muted);
}

/* Custom Radios for Yes/No */
.radio-group-container {
    display: flex;
    gap: 15px;
}

.radio-btn-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.radio-btn-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-btn-label:hover {
    background-color: #F8FAFC;
    border-color: var(--text-muted);
}

.radio-btn-label input[type="radio"]:checked + .radio-btn-custom + .radio-btn-text {
    color: white;
}

.radio-btn-label:has(input[type="radio"]:checked) {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Custom Checkboxes */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    line-height: 1.4;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    background-color: white;
    transition: var(--transition);
}

.checkbox-container input:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Science Term Box */
.term-content-box {
    background-color: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    max-height: 240px;
    overflow-y: auto;
}

.term-content-box h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.term-body {
    font-size: 13px;
    color: #475569;
    text-align: justify;
}

/* Canvas drawing pad */
.signature-pad-container {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background-color: #FCFDFE;
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

#signature-pad {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.canvas-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

/* Rating NPS grid */
.rating-stars-container {
    display: flex;
    justify-content: space-between;
}

.star-rating-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.star-rating-label input {
    position: absolute;
    opacity: 0;
}

.star-rating-label .star-icon {
    font-size: 22px;
    color: var(--border-color);
    transition: var(--transition);
}

.star-rating-label .star-num {
    font-size: 11px;
    font-weight: bold;
    margin-top: 5px;
    color: var(--text-muted);
}

.star-rating-label:hover {
    background-color: #FFFDE7;
    border-color: #FBC02D;
}

.star-rating-label:hover .star-icon {
    color: #FBC02D;
}

.star-rating-label:has(input:checked) {
    background-color: #FFF9C4;
    border-color: #FBC02D;
}

.star-rating-label:has(input:checked) .star-icon {
    color: #FBC02D;
}

/* NPS numeric row */
.nps-group-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nps-numeric-row {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 4px;
}

.nps-btn-label {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    height: 38px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    transition: var(--transition);
    position: relative;
}

.nps-btn-label input {
    position: absolute;
    opacity: 0;
}

.nps-btn-label:hover {
    background-color: #F1F5F9;
}

.nps-btn-label:has(input:checked) {
    background-color: #8e24aa;
    border-color: #8e24aa;
    color: white;
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

/* Confirmation box success */
.confirm-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    text-align: center;
}

.confirm-icon-box {
    width: 64px;
    height: 64px;
    background-color: #e8f5e9;
    color: #2E7D32;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px auto;
}

.confirm-container h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.confirm-msg {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.confirm-details-box {
    background-color: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 25px;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #E2E8F0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
}

.detail-val {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 13px;
}

/* Document Display Layout */
.document-container {
    padding: 20px 0;
}

.document-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.document-content h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.document-content p {
    font-size: 14px;
    margin-bottom: 15px;
    text-align: justify;
}

.document-actions {
    margin-top: 35px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* Footer layout */
.app-footer {
    background-color: #1e293b;
    color: #94a3b8;
    padding: 24px 20px;
    margin-top: 40px;
    border-top: 1px solid #334155;
    font-size: 12px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    margin-top: 5px;
}

.footer-links a {
    color: #38bdf8;
    margin: 0 5px;
}

.footer-links a:hover {
    color: #7dd3fc;
}

.footer-dev {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-logo {
    height: 25px;
    width: auto;
    transition: var(--transition);
}

.dev-logo:hover {
    transform: scale(1.05);
}

/* Global Alert Components */
.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.alert-danger {
    background-color: #FFEBEE;
    color: #C62828;
    border: 1px solid #EF9A9A;
}

.alert-info {
    background-color: #E3F2FD;
    color: #0D47A1;
    border: 1px solid #90CAF9;
}

/* Responsive Viewports */
@media (max-width: 600px) {
    .public-content {
        padding: 10px;
    }
    .wizard-container {
        padding: 15px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .nps-numeric-row {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .nps-btn-label {
        min-width: 36px;
        flex-shrink: 0;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-dev {
        justify-content: center;
    }
}

/* Responsive Grid layouts for Admin Panels */
@media (max-width: 768px) {
    .dashboard-rows-grid {
        grid-template-columns: 1fr !important;
    }
}
