/* Frontend styles for Title Orders */

:root {
    --to-primary: #5b21b6; /* default purple */
    --to-accent: #10b981;  /* default green */
    --to-bg: #f9fafb;
    --to-text: #111827;
    --to-muted: #6b7280;
    --to-border: #e5e7eb;
    --to-radius: 12px;
    --to-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --to-spacing: 1.5rem;
}

.to-wrap {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--to-text);
    background: transparent;
    margin: 1.5rem auto;
    max-width: 960px;
    padding: 0 1rem;
}

.to-grid {
    display: grid;
    gap: 1.5rem;
}

.to-grid-2col {
    grid-template-columns: 2fr 1.3fr;
}

.to-card {
    background: #ffffff;
    border-radius: var(--to-radius);
    padding: var(--to-spacing);
    box-shadow: var(--to-shadow);
    border: 1px solid var(--to-border);
}

.to-card-muted {
    background: #f3f4f6;
    box-shadow: none;
}

.to-card-narrow {
    max-width: 420px;
    margin: 0 auto;
}

.to-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
}

.to-card-subtitle {
    color: var(--to-muted);
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
}

/* Progress steps */

.to-progress {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.to-progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--to-muted);
}

.to-progress-circle {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid var(--to-border);
    background: #ffffff;
}

.to-progress-step.is-current .to-progress-circle {
    border-color: var(--to-primary);
    background: var(--to-primary);
}

.to-progress-step.is-current .to-progress-label {
    color: var(--to-primary);
    font-weight: 600;
}

/* Form */

.to-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.to-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.to-field label {
    font-size: 0.9rem;
    font-weight: 500;
}

.to-field input,
.to-field textarea,
.to-field select {
    border-radius: 8px;
    border: 1px solid var(--to-border);
    padding: 0.55rem 0.7rem;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.to-field input:focus,
.to-field textarea:focus,
.to-field select:focus {
    border-color: var(--to-primary);
    box-shadow: 0 0 0 1px rgba(91, 33, 182, 0.25);
}

.to-field textarea {
    resize: vertical;
}

.to-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

/* Buttons */

.to-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.to-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.55rem 1.2rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.to-btn-primary {
    background: var(--to-primary);
    border-color: var(--to-primary);
    color: #ffffff;
}

.to-btn-primary:hover {
    background: #4c1d95;
}

.to-btn-secondary {
    background: #ffffff;
    border-color: var(--to-primary);
    color: var(--to-primary);
}

.to-btn-secondary:hover {
    background: #f5f3ff;
}

.to-btn:active {
    transform: translateY(1px);
}

/* Alerts */

.to-alert {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.to-alert-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #047857;
}

.to-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* Summary */

.to-summary-box {
    font-size: 0.9rem;
}

.to-summary-section + .to-summary-section {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--to-border);
}

.to-summary-items {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0;
}

.to-summary-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.to-summary-label {
    color: var(--to-text);
}

.to-summary-price {
    white-space: nowrap;
    color: var(--to-text);
}

.to-summary-total {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

/* Tables (account page) */

.to-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.to-table th,
.to-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--to-border);
    text-align: left;
}

.to-table th {
    font-weight: 600;
    background: #f9fafb;
}

/* Notes */

.to-note {
    font-size: 0.8rem;
    color: var(--to-muted);
    margin-top: 0.25rem;
}

/* Responsive */

@media (max-width: 768px) {
    .to-grid-2col {
        grid-template-columns: 1fr;
    }
    .to-card {
        padding: 1.1rem;
    }
    .to-grid-2 {
        grid-template-columns: 1fr;
    }
}
