/* ============================================
   Torres Transporte - Premium Transport Quote
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --tt-bg-primary: #F1F3F5;
    --tt-bg-secondary: #E9ECEF;
    --tt-bg-card: rgba(255, 255, 255, 0.85);
    --tt-bg-card-hover: rgba(255, 255, 255, 0.95);
    --tt-bg-glass: rgba(255, 255, 255, 0.6);
    --tt-border: rgba(0, 0, 0, 0.08);
    --tt-border-active: rgba(27, 152, 208, 0.5);

    --tt-accent: #1B98D0;
    --tt-accent-light: #4DB3E0;
    --tt-accent-dark: #1579A8;
    --tt-tertiary: #D4944A;
    --tt-tertiary-light: #E0AD6F;
    --tt-green: #25d366;
    --tt-green-dark: #1da851;
    --tt-blue: #1B98D0;
    --tt-red: #E74C3C;
    --tt-orange: #D4944A;

    --tt-text-primary: #2A3D52;
    --tt-text-secondary: #5A7A9E;
    --tt-text-muted: #ADB5BD;

    --tt-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --tt-font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;

    --tt-radius-sm: 8px;
    --tt-radius-md: 12px;
    --tt-radius-lg: 16px;
    --tt-radius-xl: 20px;
    --tt-radius-full: 50%;

    --tt-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --tt-shadow-accent: 0 4px 20px rgba(27, 152, 208, 0.2);
    --tt-shadow-green: 0 4px 20px rgba(37, 211, 102, 0.25);

    --tt-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --tt-transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Base Container --- */
.tt-app {
    position: relative;
    max-width: 720px;
    margin: 40px auto;
    padding: 40px 32px;
    background: var(--tt-bg-primary);
    border-radius: var(--tt-radius-xl);
    border: 1px solid var(--tt-border);
    font-family: var(--tt-font-body);
    color: var(--tt-text-primary);
    overflow: hidden;
    box-shadow: var(--tt-shadow);
}

.tt-app *,
.tt-app *::before,
.tt-app *::after {
    box-sizing: border-box;
}

/* --- Background Decoration --- */
.tt-bg-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.tt-bg-orb {
    position: absolute;
    border-radius: var(--tt-radius-full);
    filter: blur(100px);
    opacity: 0.06;
}

.tt-bg-orb--1 {
    width: 300px;
    height: 300px;
    background: var(--tt-accent);
    top: -100px;
    right: -80px;
    animation: tt-float 8s ease-in-out infinite;
}

.tt-bg-orb--2 {
    width: 200px;
    height: 200px;
    background: var(--tt-blue);
    bottom: -60px;
    left: -60px;
    animation: tt-float 10s ease-in-out infinite reverse;
}

.tt-bg-orb--3 {
    width: 150px;
    height: 150px;
    background: var(--tt-green);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: tt-float 12s ease-in-out infinite;
}

@keyframes tt-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* --- Header --- */
.tt-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 32px;
}

.tt-header__icon {
    display: inline-flex;
    margin-bottom: 16px;
    animation: tt-bounce-in 0.6s var(--tt-transition-bounce);
}

@keyframes tt-bounce-in {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.tt-header__title {
    font-family: var(--tt-font-heading);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
    background: linear-gradient(135deg, var(--tt-accent-light), var(--tt-accent), var(--tt-accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.tt-header__subtitle {
    font-size: 14px;
    color: var(--tt-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* --- Progress Bar --- */
.tt-progress {
    position: relative;
    z-index: 1;
    margin-bottom: 36px;
}

.tt-progress__bar {
    height: 3px;
    background: var(--tt-border);
    border-radius: 3px;
    margin-bottom: 16px;
    overflow: hidden;
}

.tt-progress__fill {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--tt-accent), var(--tt-accent-light));
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tt-progress__steps {
    display: flex;
    justify-content: space-between;
}

.tt-progress__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tt-progress__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--tt-radius-full);
    background: var(--tt-bg-card);
    border: 2px solid var(--tt-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--tt-text-muted);
    transition: var(--tt-transition);
}

.tt-progress__label {
    font-size: 11px;
    font-weight: 500;
    color: var(--tt-text-muted);
    transition: var(--tt-transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tt-progress__step--active .tt-progress__dot {
    background: linear-gradient(135deg, var(--tt-accent), var(--tt-accent-dark));
    border-color: var(--tt-accent);
    color: #fff;
    box-shadow: var(--tt-shadow-accent);
}

.tt-progress__step--active .tt-progress__label {
    color: var(--tt-accent-light);
}

.tt-progress__step--done .tt-progress__dot {
    background: var(--tt-accent-dark);
    border-color: var(--tt-accent-dark);
    color: #fff;
}

.tt-progress__step--done .tt-progress__label {
    color: var(--tt-text-secondary);
}

/* --- Steps --- */
.tt-step {
    display: none;
    position: relative;
    z-index: 1;
    animation: tt-fade-in 0.4s ease;
}

.tt-step--active {
    display: block;
}

@keyframes tt-fade-in {
    0% { opacity: 0; transform: translateY(12px); }
    100% { opacity: 1; transform: translateY(0); }
}

.tt-step__title {
    font-family: var(--tt-font-heading);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--tt-text-primary);
}

.tt-step__desc {
    font-size: 14px;
    color: var(--tt-text-secondary);
    margin: 0 0 28px;
    line-height: 1.5;
}

/* --- Vehicle Cards --- */
.tt-vehicles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.tt-vehicle-card {
    position: relative;
    padding: 24px 16px 20px;
    background: var(--tt-bg-card);
    border: 2px solid var(--tt-border);
    border-radius: var(--tt-radius-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--tt-transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.tt-vehicle-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27, 152, 208, 0.08), transparent);
    opacity: 0;
    transition: var(--tt-transition);
}

.tt-vehicle-card:hover {
    border-color: rgba(27, 152, 208, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.tt-vehicle-card:hover::before {
    opacity: 1;
}

.tt-vehicle-card--selected {
    border-color: var(--tt-accent) !important;
    box-shadow: var(--tt-shadow-accent) !important;
}

.tt-vehicle-card--selected::before {
    opacity: 1 !important;
}

.tt-vehicle-card__icon {
    color: var(--tt-accent);
    margin-bottom: 12px;
    transition: var(--tt-transition);
}

.tt-vehicle-card--selected .tt-vehicle-card__icon {
    color: var(--tt-accent-light);
}

.tt-vehicle-card__name {
    font-family: var(--tt-font-heading);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--tt-text-primary);
}

.tt-vehicle-card__capacity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tt-accent);
    margin-bottom: 8px;
}

.tt-vehicle-card__desc {
    font-size: 12px;
    color: var(--tt-text-muted);
    margin: 0;
    line-height: 1.4;
}

.tt-vehicle-card__check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: var(--tt-accent);
    border-radius: var(--tt-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transform: scale(0);
    transition: var(--tt-transition-bounce);
}

.tt-vehicle-card--selected .tt-vehicle-card__check {
    opacity: 1;
    transform: scale(1);
}

/* --- Route Section --- */
.tt-route {
    margin-bottom: 32px;
}

.tt-route__point {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.tt-route__marker {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--tt-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
}

.tt-route__marker--origin {
    background: rgba(27, 152, 208, 0.15);
    color: var(--tt-accent);
    border: 2px solid rgba(27, 152, 208, 0.3);
}

.tt-route__marker--destination {
    background: rgba(212, 148, 74, 0.15);
    color: var(--tt-tertiary);
    border: 2px solid rgba(212, 148, 74, 0.3);
}

.tt-route__marker--stop {
    background: rgba(212, 148, 74, 0.1);
    color: var(--tt-tertiary-light);
    border: 2px solid rgba(212, 148, 74, 0.25);
    width: 30px;
    height: 30px;
}

.tt-route__field {
    flex: 1;
}

.tt-route__connector {
    display: flex;
    justify-content: flex-start;
    padding-left: 17px;
    margin: 4px 0;
}

.tt-route__line {
    width: 2px;
    height: 24px;
    background: repeating-linear-gradient(
        to bottom,
        var(--tt-border) 0,
        var(--tt-border) 4px,
        transparent 4px,
        transparent 8px
    );
}

.tt-route__add-stop {
    padding-left: 52px;
    margin: 4px 0;
}

.tt-route__datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--tt-border);
}

/* --- Stop item --- */
.tt-stop-item {
    animation: tt-fade-in 0.3s ease;
}

.tt-stop-item .tt-route__point {
    align-items: flex-start;
}

.tt-stop-item .tt-route__marker {
    margin-top: 28px;
}

.tt-stop-item .tt-route__field {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.tt-stop-item .tt-route__field .tt-field-group {
    flex: 1;
}

.tt-stop-remove {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 87, 87, 0.1);
    border: 1px solid rgba(255, 87, 87, 0.2);
    border-radius: var(--tt-radius-sm);
    color: var(--tt-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tt-transition);
    margin-bottom: 4px;
}

.tt-stop-remove:hover {
    background: rgba(255, 87, 87, 0.2);
    border-color: var(--tt-red);
}

/* --- Form Elements --- */
.tt-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tt-text-secondary);
    margin-bottom: 8px;
}

.tt-label svg {
    opacity: 0.6;
}

.tt-select,
.tt-input,
.tt-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--tt-bg-glass);
    border: 1.5px solid var(--tt-border);
    border-radius: var(--tt-radius-md);
    color: var(--tt-text-primary);
    font-family: var(--tt-font-body);
    font-size: 14px;
    transition: var(--tt-transition);
    outline: none;
}

.tt-select:hover,
.tt-input:hover,
.tt-textarea:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.tt-select:focus,
.tt-input:focus,
.tt-textarea:focus {
    border-color: var(--tt-accent);
    box-shadow: 0 0 0 3px rgba(27, 152, 208, 0.15);
}

.tt-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23888' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.tt-select option {
    background: #fff;
    color: var(--tt-text-primary);
    padding: 8px;
}

.tt-textarea {
    resize: vertical;
    min-height: 80px;
}

.tt-input[type="date"],
.tt-input[type="time"] {
    color-scheme: light;
}

.tt-input--hidden {
    display: none;
    margin-top: 8px;
}

.tt-input--visible {
    display: block !important;
}

.tt-field-group {
    margin-bottom: 4px;
}

.tt-form-fields .tt-field-group {
    margin-bottom: 20px;
}

.tt-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* --- Validation --- */
.tt-input--error,
.tt-select--error {
    border-color: var(--tt-red) !important;
    box-shadow: 0 0 0 3px rgba(255, 87, 87, 0.15) !important;
}

.tt-error-msg {
    font-size: 12px;
    color: var(--tt-red);
    margin-top: 4px;
    display: none;
}

.tt-error-msg--visible {
    display: block;
    animation: tt-shake 0.4s ease;
}

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

/* --- Buttons --- */
.tt-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--tt-radius-md);
    font-family: var(--tt-font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tt-transition);
    outline: none;
    text-decoration: none;
    line-height: 1;
}

.tt-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.tt-btn--next {
    background: linear-gradient(135deg, var(--tt-accent), var(--tt-accent-dark));
    color: #fff;
    box-shadow: var(--tt-shadow-accent);
    margin-left: auto;
}

.tt-btn--next:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(27, 152, 208, 0.35);
}

.tt-btn--next:not(:disabled):active {
    transform: translateY(0);
}

.tt-btn--back {
    background: var(--tt-bg-glass);
    color: var(--tt-text-secondary);
    border: 1px solid var(--tt-border);
}

.tt-btn--back:hover {
    background: var(--tt-bg-card);
    color: var(--tt-text-primary);
}

.tt-btn--ghost {
    background: transparent;
    color: var(--tt-accent);
    border: 1.5px dashed rgba(27, 152, 208, 0.3);
    padding: 10px 20px;
    font-size: 13px;
    width: 100%;
    justify-content: center;
    border-radius: var(--tt-radius-md);
}

.tt-btn--ghost:hover {
    background: rgba(27, 152, 208, 0.08);
    border-color: var(--tt-accent);
}

.tt-btn--whatsapp {
    background: linear-gradient(135deg, var(--tt-green), var(--tt-green-dark));
    color: #fff;
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--tt-radius-lg);
    box-shadow: var(--tt-shadow-green);
    animation: tt-pulse-green 2s ease-in-out infinite;
}

.tt-btn--whatsapp:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.tt-btn--whatsapp:active {
    transform: translateY(0) scale(0.98);
}

@keyframes tt-pulse-green {
    0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.5); }
}

.tt-step__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 24px;
    border-top: 1px solid var(--tt-border);
}

.tt-step__actions--center {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.tt-step__actions--center .tt-btn--back {
    align-self: flex-start;
}

/* --- Summary --- */
.tt-summary {
    background: var(--tt-bg-card);
    border: 1px solid var(--tt-border);
    border-radius: var(--tt-radius-lg);
    padding: 28px 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tt-summary__section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tt-border);
}

.tt-summary__section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.tt-summary__heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--tt-font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--tt-accent);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.tt-summary__heading svg {
    opacity: 0.8;
}

.tt-summary__item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
    font-size: 14px;
}

.tt-summary__label {
    color: var(--tt-text-secondary);
    font-weight: 400;
}

.tt-summary__value {
    color: var(--tt-text-primary);
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

.tt-summary__route-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
}

.tt-summary__route-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--tt-radius-full);
    flex-shrink: 0;
}

.tt-summary__route-dot--origin {
    background: var(--tt-accent);
    box-shadow: 0 0 8px rgba(27, 152, 208, 0.4);
}

.tt-summary__route-dot--stop {
    background: var(--tt-tertiary-light);
    box-shadow: 0 0 8px rgba(212, 148, 74, 0.4);
    width: 8px;
    height: 8px;
}

.tt-summary__route-dot--destination {
    background: var(--tt-tertiary);
    box-shadow: 0 0 8px rgba(212, 148, 74, 0.4);
}

.tt-summary__route-line {
    width: 2px;
    height: 12px;
    background: var(--tt-border);
    margin-left: 4px;
}

.tt-summary__notes {
    font-size: 13px;
    color: var(--tt-text-secondary);
    font-style: italic;
    line-height: 1.5;
    padding: 12px 16px;
    background: var(--tt-bg-glass);
    border-radius: var(--tt-radius-sm);
    border-left: 3px solid var(--tt-accent);
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .tt-app {
        margin: 16px;
        padding: 28px 20px;
        border-radius: var(--tt-radius-lg);
    }

    .tt-header__title {
        font-size: 22px;
    }

    .tt-vehicles {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tt-vehicle-card {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        padding: 16px;
        text-align: left;
        gap: 0 14px;
    }

    .tt-vehicle-card__icon {
        grid-row: 1 / 3;
        align-self: center;
        margin-bottom: 0;
    }

    .tt-vehicle-card__icon svg {
        width: 56px;
        height: 35px;
    }

    .tt-vehicle-card__name {
        font-size: 16px;
        margin: 0;
        align-self: end;
    }

    .tt-vehicle-card__capacity {
        font-size: 12px;
        margin: 2px 0 0;
        align-self: start;
        grid-column: 2;
    }

    .tt-vehicle-card__desc {
        display: none;
    }

    .tt-vehicle-card__check {
        grid-row: 1 / 3;
        align-self: center;
        position: static;
        width: 24px;
        height: 24px;
    }

    .tt-vehicle-card__check svg {
        width: 14px;
        height: 14px;
    }

    .tt-field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .tt-route__datetime {
        grid-template-columns: 1fr;
    }

    .tt-step__actions--center {
        align-items: stretch;
    }

    .tt-btn--whatsapp {
        justify-content: center;
    }

    .tt-progress__label {
        font-size: 10px;
    }

    .tt-summary__item {
        flex-direction: column;
        gap: 2px;
    }

    .tt-summary__value {
        text-align: left;
        max-width: 100%;
    }
}

@media (max-width: 400px) {
    .tt-app {
        margin: 8px;
        padding: 20px 16px;
    }

    .tt-header__title {
        font-size: 20px;
    }

    .tt-progress__dot {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
}
