/* =============================================================
   GRUPO CREATE EXPERIENCE - REFINED
   ============================================================= */

:root {
    --gf-bg: #F8FAFC;
    --gf-card-bg: #FFFFFF;
    --gf-border: #E2E8F0;
    --gf-primary: #BE123C; /* Red-ish color from screenshot */
    --gf-primary-light: #FFF1F2;
    --gf-text-main: #1E293B;
    --gf-text-muted: #64748B;
    --gf-radius: 12px;
    --gf-radius-sm: 8px;
    --gf-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.grupo-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Hero Section */
.grupo-form__hero {
    margin-bottom: 1rem;
}

.grupo-form__intro h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gf-text-main);
    margin: 0 0 0.5rem 0;
}

.grupo-form__intro p {
    color: var(--gf-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Tabs Navigation */
.grupo-tabs {
    display: flex;
    background: #F1F5F9;
    padding: 0.35rem;
    border-radius: var(--gf-radius);
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.grupo-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--gf-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--gf-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.grupo-tab i {
    font-size: 1.1rem;
}

.grupo-tab:hover {
    color: var(--gf-text-main);
    background: rgba(255,255,255,0.5);
}

.grupo-tab.is-active {
    background: white;
    color: var(--gf-text-main);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-weight: 600;
}

/* Form Body */
.grupo-form__body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.grupo-panel,
.grupo-tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.grupo-panel.is-active,
.grupo-tab-panel.is-active {
    display: block;
}

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

/* General Stack */
.grupo-general-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* General Card */
.general-card {
    background: var(--gf-card-bg);
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    padding: 1.5rem;
    box-shadow: var(--gf-shadow);
}

.general-card__header {
    margin-bottom: 1.5rem;
}

.general-card__icon-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* Header left group: keep icon + actions together */
.general-card__header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Place actions to the right inside header */
.general-card__header > .header-actions {
    margin-left: auto;
}

.header-action-masa {
    margin-left: 0; /* handled by gap in .header-actions */
}

.general-card__icon-wrapper i {
    color: var(--gf-primary);
    font-size: 1.25rem;
}

.general-card__icon-wrapper span {
    font-weight: 600;
    color: var(--gf-text-main);
    font-size: 1rem;
}

.general-card__description {
    color: var(--gf-text-muted);
    font-size: 0.9rem;
    margin: 0;
    padding-left: 2rem; /* Align with text start */
}

/* Grid Layout */
.general-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Form Controls */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gf-text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.form-group label i {
    color: var(--gf-text-muted);
    font-size: 0.9rem;
    cursor: help;
}

.form-control {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-sm);
    background: #F8FAFC;
    color: var(--gf-text-main);
    font-size: 0.95rem;
    transition: all 0.2s;
    overflow-x: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

textarea.form-control {
    white-space: normal;
    overflow-x: auto;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: var(--gf-primary);
    background: white;
    box-shadow: 0 0 0 3px var(--gf-primary-light);
}

.form-control::placeholder {
    color: #94A3B8;
}

/* Select Wrapper for custom arrow if needed, 
   but native select styling is usually sufficient with appearance: none */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0.6rem;
    height: 0.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748B' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
}

select.form-control {
    appearance: none;
    padding-right: 2.5rem;
}

/* Input Icon Wrapper */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper::after {
    content: ''; /* Calendar icon placeholder if needed */
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    /* Add icon here if desired */
}

/* Footer Actions */
.grupo-form__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gf-border);
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--gf-radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn--ghost {
    background: transparent;
    color: var(--gf-text-main);
    border-color: var(--gf-border);
}

.btn--ghost:hover {
    background: var(--gf-bg);
}

.btn--secondary {
    background: white;
    border-color: var(--gf-border);
    color: var(--gf-text-main);
}

.btn--secondary:hover {
    border-color: var(--gf-text-muted);
}

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

.btn--primary:hover {
    background: #9F1239; /* Darker shade */
}

/* Responsive */
@media (max-width: 640px) {
    .grupo-tabs {
        overflow-x: auto;
        justify-content: flex-start;
    }
    
    .grupo-tab {
        min-width: 120px;
    }
}

/* =============================================================
   LEGACY / OTHER TABS SUPPORT
   ============================================================= */

.grupo-panel__header {
    margin-bottom: 1.5rem;
}

.grupo-panel__eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gf-text-muted);
    margin-bottom: 0.35rem;
}

.grupo-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.grupo-panel__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: flex-start;
}

.grupo-panel__stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.grupo-panel__card {
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius);
    padding: 1.25rem;
    background: var(--gf-bg);
}

/* Schedule Builder Buttons */
.schedule-builder__days {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.schedule-day {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid var(--gf-border);
    background: white;
    color: var(--gf-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.schedule-day:hover {
    border-color: var(--gf-primary);
    color: var(--gf-primary);
    background: var(--gf-primary-light);
}

.schedule-day.is-selected {
    background: var(--gf-primary);
    color: white;
    border-color: var(--gf-primary);
    box-shadow: 0 2px 4px rgba(190, 18, 60, 0.2);
}

.schedule-builder__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.schedule-builder__time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-builder__time input {
    padding: 0.5rem;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-sm);
}

/* Insight Card */
.insight-card {
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: var(--gf-radius);
    padding: 1.5rem;
}

.insight-card__eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #0369A1;
    margin-bottom: 0.5rem;
}

.insight-card h3 {
    color: #0C4A6E;
    margin: 0 0 1rem 0;
}

.insight-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.insight-card__stats dt {
    font-size: 0.8rem;
    color: #0369A1;
}

.insight-card__stats dd {
    font-weight: 600;
    color: #0C4A6E;
    margin: 0;
}

/* =============================================================
   FORM EXTRAS (ECONOMY & ACTIONS)
   ============================================================= */

.input-with-action {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-action input {
    padding-right: 8rem; /* Space for button */
}

.input-with-action button {
    position: absolute;
    right: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    background: white;
    border: 1px solid var(--gf-border);
    border-radius: 6px;
    color: var(--gf-text-muted);
    cursor: pointer;
}

.input-with-action button:hover {
    color: var(--gf-primary);
    border-color: var(--gf-primary);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.85rem 1rem;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-sm);
    background: white;
    transition: all 0.2s;
}

.checkbox-wrapper:hover {
    border-color: var(--gf-primary);
    background: #FFF1F2; /* Light red tint */
}

.checkbox-wrapper input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--gf-primary);
    cursor: pointer;
}

.checkbox-wrapper span {
    font-size: 0.95rem;
    color: var(--gf-text-main);
    font-weight: 500;
}

.form-hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--gf-text-muted);
}

/* Input Group Styles */
.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--gf-border);
    border-radius: var(--gf-radius-sm);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.input-group:focus-within {
    border-color: var(--gf-primary);
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.1);
}

.input-group .form-control {
    border: none;
    border-radius: 0;
    flex: 1;
    margin: 0;
}

.input-group .form-control:focus {
    box-shadow: none;
    border-color: transparent;
}

.input-group .btn {
    border: none;
    border-radius: 0;
    padding: 0.5rem 0.75rem;
    background: #F8FAFC;
    color: var(--gf-text-muted);
    border-left: 1px solid var(--gf-border);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
}

.input-group .btn:hover {
    background: #E2E8F0;
    color: var(--gf-text-main);
}

.input-group .btn:active {
    background: #CBD5E1;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--gf-text-muted);
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--gf-primary, #BE123C);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.2);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Tooltip styles */
.tooltip-trigger {
    position: relative;
    display: inline-flex;
}

.tooltip-trigger[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: #1f2937;
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 0.375rem;
    z-index: 1000;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tooltip-trigger[title]:hover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}
