/* =============================================
   Damans Tile Calculator – Public Styles v1.1
   ============================================= */

.dtc-calc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 680px;
    margin: 0 auto;
    color: #1a1a2e;
    font-size: 15px;
    line-height: 1.5;
}

/* Header */
.dtc-calc-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 18px 24px;
    border-radius: 0;
}
.dtc-calc-logo { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }

/* Mode toggle */
.dtc-mode-toggle-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #e4e8ef;
    border-top: none;
    background: #f4f6fa;
}
.dtc-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 18px 12px;
    background: #f4f6fa;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    text-align: center;
    line-height: 1.3;
}
.dtc-mode-btn:first-child {
    border-right: 1px solid #e4e8ef;
}
.dtc-mode-btn:hover {
    background: #eef0f6;
}
.dtc-mode-btn--active {
    background: #fff;
    border-bottom-color: #c8a96e;
}
.dtc-mode-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 2px;
}
.dtc-mode-title {
    font-size: .88rem;
    font-weight: 700;
    color: #1a1a2e;
}
.dtc-mode-btn--active .dtc-mode-title {
    color: #c8a96e;
}
.dtc-mode-desc {
    font-size: .72rem;
    color: #888;
    font-weight: 400;
}
@media (max-width: 400px) {
    .dtc-mode-icon  { font-size: 1.2rem; }
    .dtc-mode-title { font-size: .8rem; }
    .dtc-mode-desc  { display: none; }
}

/* Sections */
.dtc-section {
    background: #fff;
    border: 1px solid #e4e8ef;
    border-top: none;
    padding: 20px 24px;
}
.dtc-section:last-child { border-radius: 0 0 12px 12px; }
.dtc-section-title {
    font-size: .95rem; font-weight: 700; color: #1a1a2e;
    margin: 0 0 16px; padding-bottom: 8px;
    border-bottom: 2px solid #e4e8ef;
}

/* Catalogue status notices */
.dtc-cat-notice {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.4;
}
.dtc-notice-warn {
    background: #fff8e1;
    border: 1px solid #ffc107;
    color: #856404;
}
.dtc-notice-danger {
    background: #fdf2f3;
    border: 1px solid #dc3545;
    color: #842029;
}

/* Labels */
.dtc-label {
    display: block;
    font-size: .8rem; font-weight: 600; color: #555;
    text-transform: uppercase; letter-spacing: .04em;
    margin-bottom: 6px;
}

/* Inputs */
.dtc-input, .dtc-select {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid #d0d7e3; border-radius: 7px;
    font-size: .95rem; color: #1a1a2e; background: #fafbfd;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
}
.dtc-input:focus, .dtc-select:focus {
    border-color: #c8a96e;
    box-shadow: 0 0 0 3px rgba(200,169,110,.15);
    outline: none; background: #fff;
}
.dtc-input::placeholder { color: #c0c7d4; }
.dtc-input-sm { max-width: 100px; }

.dtc-input-suffix-wrap { position: relative; display: flex; align-items: center; }
.dtc-input-suffix-wrap .dtc-input { padding-right: 44px; }
.dtc-suffix { position: absolute; right: 12px; font-size: .78rem; font-weight: 600; color: #888; pointer-events: none; white-space: nowrap; }

.dtc-hint { font-size: .78rem; color: #888; margin: 5px 0 0; }

/* Row layout */
.dtc-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.dtc-row .dtc-label { min-width: 130px; margin-bottom: 0; }

/* Trio */
.dtc-trio-grid { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 8px; }
.dtc-trio-item { flex: 1; min-width: 0; }
.dtc-trio-sep  { padding-top: 32px; font-size: 1rem; color: #bbb; flex-shrink: 0; }
.dtc-trio-hint { font-size: .72rem; color: #c8a96e; margin-top: 4px; min-height: 16px; font-weight: 600; }

@media (max-width: 540px) {
    .dtc-trio-grid { flex-direction: column; gap: 14px; }
    .dtc-trio-sep  { display: none; }
    .dtc-trio-item { width: 100%; }
    .dtc-input-sm  { max-width: 100%; }
    .dtc-row       { flex-direction: column; align-items: flex-start; }
}

/* Search */
.dtc-search-wrap { position: relative; }
.dtc-suggestions {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: #fff; border: 1.5px solid #c8a96e; border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14); z-index: 9999;
    max-height: 300px; overflow-y: auto;
}
.dtc-suggestion-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f0f0f0; transition: background .1s; }
.dtc-suggestion-item:last-child { border-bottom: none; }
.dtc-suggestion-item:hover, .dtc-suggestion-item.dtc-active { background: #fdf8f0; }
.dtc-sug-code   { font-weight: 700; font-size: .9rem; color: #1a1a2e; }
.dtc-sug-detail { font-size: .78rem; color: #666; margin-top: 2px; }
.dtc-sug-no-results { padding: 12px 14px; color: #888; font-size: .85rem; text-align: center; }

/* Tile info card */
.dtc-tile-card {
    background: #fffbf4; border: 1.5px solid #c8a96e; border-top: none; padding: 14px 24px;
}
.dtc-tile-card-inner { display: flex; align-items: flex-start; gap: 14px; }
.dtc-tile-art  { font-size: 1.05rem; font-weight: 800; color: #1a1a2e; min-width: 120px; padding-top: 2px; }
.dtc-tile-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; flex: 1; }
.dtc-tile-meta span {
    font-size: .8rem; background: #fff; border: 1px solid #e4c98a;
    color: #6b5a2e; padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.dtc-tile-meta span:empty { display: none; }
.dtc-clear-btn { background: none; border: none; color: #aaa; cursor: pointer; font-size: 1rem; padding: 0; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.dtc-clear-btn:hover { color: #c0392b; }
.dtc-warnings  { margin-top: 8px; }
.dtc-warning   { font-size: .78rem; color: #856404; background: #fff3cd; border: 1px solid #ffc107; border-radius: 4px; padding: 4px 10px; margin-top: 4px; }

/* Calc section */
.dtc-calc-section { background: #fafbfd; }

/* Results */
.dtc-results {
    background: #fff; border: 1px solid #e4e8ef; border-top: none;
    padding: 20px 24px; border-radius: 0 0 12px 12px;
}
.dtc-results-grid { margin-bottom: 20px; }
.dtc-result-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-bottom: 1px solid #f2f4f8; font-size: .88rem;
}
.dtc-result-row:last-child { border-bottom: none; }
.dtc-result-label { color: #555; }
.dtc-result-val   { font-weight: 600; color: #1a1a2e; text-align: right; }
.dtc-result-highlight { font-size: 1rem; color: #1a6e3c; }
.dtc-result-total-row { background: #f8f9fa; border-radius: 6px; padding: 8px 10px !important; margin-top: 4px; border-bottom: none !important; }
.dtc-result-total { font-size: 1.1rem; color: #c8a96e; }

/* Textarea + copy */
.dtc-message-wrap { margin-top: 20px; }
.dtc-textarea {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid #d0d7e3; border-radius: 7px;
    font-size: .85rem; color: #333; background: #fafbfd;
    resize: vertical; box-sizing: border-box; font-family: inherit; line-height: 1.5;
}
.dtc-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 18px; border-radius: 7px;
    font-size: .88rem; font-weight: 600; cursor: pointer; border: none;
    transition: background .15s, transform .1s;
}
.dtc-btn:active { transform: scale(.97); }
.dtc-btn-copy { background: #1a1a2e; color: #fff; margin-top: 8px; }
.dtc-btn-copy:hover { background: #2c2c4a; }
.dtc-copy-confirm { font-size: .85rem; color: #1a6e3c; font-weight: 600; margin-left: 10px; }

/* Disclaimer */
.dtc-disclaimer {
    font-size: .75rem; color: #888; margin-top: 16px;
    border-top: 1px solid #f0f0f0; padding-top: 12px; line-height: 1.6;
}

/* Manual entry grid */
.dtc-manual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    margin-top: 4px;
}
@media (max-width: 480px) {
    .dtc-manual-grid { grid-template-columns: 1fr; }
}

/* Copy header with price toggle */
.dtc-copy-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.dtc-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: #555;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}
.dtc-toggle-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #c8a96e;
}

/* Delivery rows */
.dtc-delivery-row .dtc-result-label { color: #555; }
.dtc-free-delivery { color: #1a6e3c; font-weight: 700; }
.dtc-delivery-nudge {
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 16px !important;
    margin: 8px 0 4px !important;
    border-bottom: none !important;
}
.dtc-delivery-nudge-text {
    font-size: .82rem;
    color: #856404;
    line-height: 1.4;
}

/* Manual delivery toggle header */
.dtc-manual-delivery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
