:root {
    --ti-primary: #8B0407;
    --ti-primary-dark: #6b0305;
    --ti-accent: #F58120;
    --ti-accent-dark: #d96f16;
    --ti-text: #1f1f1f;
    --ti-muted: #6b6b6b;
    --ti-border: #e6e0e0;
}

.ti-open-btn,
.ti-submit-btn,
.ti-modal,
.ti-overlay {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-sizing: border-box;
}

.ti-modal *,
.ti-modal *::before,
.ti-modal *::after {
    box-sizing: border-box;
}

/* ===== Tombol Trigger ===== */
.ti-open-btn {
    display: inline-block;
    padding: 13px 28px;
    background: var(--ti-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.ti-open-btn:hover {
    background: var(--ti-accent);
}

.ti-open-btn:active {
    transform: scale(0.97);
}

/* ===== Overlay & Modal ===== */
.ti-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 10, 10, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.ti-overlay.ti-open {
    display: flex;
}

.ti-modal {
    background: #fff;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 32px 28px 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    border-top: 5px solid var(--ti-primary);
    animation: ti-pop 0.2s ease;
}

@keyframes ti-pop {
    from { transform: scale(0.96); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.ti-modal h2 {
    margin: 0 0 6px 0;
    font-size: 21px;
    font-weight: 800;
    color: var(--ti-text);
}

.ti-subtitle {
    margin: 0 0 20px 0;
    font-size: 13.5px;
    color: var(--ti-muted);
    font-weight: 500;
}

.ti-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--ti-muted);
    cursor: pointer;
    padding: 4px;
}

.ti-close:hover {
    color: var(--ti-primary);
}

/* ===== Form Fields ===== */
.ti-field {
    margin-bottom: 16px;
}

.ti-field label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ti-text);
    margin-bottom: 6px;
}

.ti-required {
    color: var(--ti-primary);
}

.ti-field input[type="text"],
.ti-field select,
.ti-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--ti-border);
    border-radius: 9px;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ti-text);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ti-field textarea {
    resize: vertical;
    min-height: 70px;
}

.ti-field input::placeholder,
.ti-field textarea::placeholder {
    color: #a3a3a3;
    font-weight: 400;
}

.ti-field input:focus,
.ti-field select:focus,
.ti-field textarea:focus {
    outline: none;
    border-color: var(--ti-primary);
    box-shadow: 0 0 0 3px rgba(139, 4, 7, 0.12);
}

/* ===== Submit Button ===== */
.ti-submit-btn {
    width: 100%;
    padding: 14px;
    margin-top: 6px;
    background: var(--ti-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.ti-submit-btn:hover {
    background: var(--ti-accent-dark);
}

.ti-submit-btn:active {
    transform: scale(0.98);
}

/* ===== Responsive ===== */
@media screen and (max-width: 600px) {
    .ti-modal {
        padding: 26px 20px 22px;
        border-radius: 14px;
        max-height: 92vh;
    }

    .ti-modal h2 {
        font-size: 19px;
    }

    .ti-open-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
}

@media screen and (max-width: 380px) {
    .ti-overlay {
        padding: 10px;
    }

    .ti-field input[type="text"],
    .ti-field select,
    .ti-field textarea {
        font-size: 14px;
        padding: 11px 12px;
    }
}
