/* Travel System WordPress Plugin – Styles */

.ts-programs {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}

.ts-grid.ts-cols-1 { grid-template-columns: 1fr; }
.ts-grid.ts-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ts-grid.ts-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ts-grid.ts-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .ts-grid.ts-cols-3,
    .ts-grid.ts-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .ts-grid { grid-template-columns: 1fr !important; }
}

/* Card */
.ts-program-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}

.ts-program-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    transform: translateY(-2px);
}

.ts-program-header {
    padding: 20px 20px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.ts-program-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #111827;
}

.ts-program-destination {
    font-size: .875rem;
    color: #6b7280;
}

.ts-program-body {
    padding: 14px 20px;
    flex: 1;
}

.ts-program-dates {
    font-size: .875rem;
    color: #374151;
    margin: 0 0 8px;
}

.ts-program-price {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 8px 0;
}

.ts-program-desc {
    font-size: .875rem;
    color: #6b7280;
    margin-top: 10px;
}

.ts-program-footer {
    padding: 16px 20px;
    border-top: 1px solid #f3f4f6;
}

/* Buttons */
.ts-btn {
    display: inline-block;
    background: #2563eb;
    color: #fff !important;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background .2s;
}

.ts-btn:hover { opacity: .9; }

.ts-btn-outline {
    display: inline-block;
    background: transparent;
    color: #2563eb;
    border: 1px solid #2563eb;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.ts-btn-outline:hover {
    background: #2563eb;
    color: #fff;
}

.ts-btn-disabled {
    display: inline-block;
    background: #d1d5db;
    color: #6b7280;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: .9rem;
}

/* Badges */
.ts-seats-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    margin: 4px 0;
}

.ts-badge-available { background: #16a34a; }
.ts-badge-full      { background: #dc2626; }

/* Detail page */
.ts-program-detail {
    max-width: 800px;
    margin: 0 auto;
}

.ts-program-detail h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.ts-big-price {
    font-size: 1.75rem !important;
    font-weight: 700;
}

.ts-section {
    margin: 24px 0;
    padding: 18px;
    background: #f9fafb;
    border-radius: 10px;
    border-left: 4px solid #e5e7eb;
}

.ts-section h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #111827;
}

.ts-section p {
    margin: 0;
    color: #374151;
    line-height: 1.6;
}

/* Registration form */
.ts-registration-wrap {
    max-width: 700px;
    margin: 36px auto 0;
    padding: 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.ts-registration-wrap h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #111827;
}

.ts-form-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.ts-form-row-2 { grid-template-columns: 1fr 1fr; }

@media (max-width: 600px) {
    .ts-form-row-2 { grid-template-columns: 1fr; }
    .ts-registration-wrap { padding: 20px; }
}

.ts-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.ts-form-group label {
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.ts-form-group input,
.ts-form-group select,
.ts-form-group textarea {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: .95rem;
    color: #111827;
    background: #fff;
    transition: border-color .2s;
}

.ts-form-group input:focus,
.ts-form-group select:focus,
.ts-form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.ts-required label::after { content: ' *'; color: #dc2626; }

.ts-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: 8px;
    cursor: pointer;
    color: #374151;
}

.ts-supplement-price {
    margin-left: auto;
    color: #16a34a;
    font-weight: 600;
}

.ts-coupon-input-wrap {
    display: flex;
    gap: 8px;
}

.ts-coupon-input-wrap input { flex: 1; }

.ts-coupon-msg {
    font-size: .875rem;
    margin-top: 6px;
    display: block;
}

.ts-coupon-msg.success { color: #16a34a; }
.ts-coupon-msg.error   { color: #dc2626; }

.ts-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 8px;
}

/* Messages */
.ts-success-msg {
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    color: #166534;
    font-weight: 500;
    margin-bottom: 20px;
}

.ts-error-msg {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
    margin-bottom: 20px;
}

.ts-notice {
    padding: 14px 18px;
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 10px;
    color: #713f12;
    margin-top: 24px;
}

.ts-notice.ts-full {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.ts-error { color: #dc2626; font-size: .9rem; }
.ts-empty { color: #6b7280; font-size: .9rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   Elementor Widget: Sadržaj putovanja (.ts-travel-content)
   Bazični stilovi — Elementor tipografija kontrole ih mogu pregaziti.
═══════════════════════════════════════════════════════════════════════════ */

.ts-travel-content {
    line-height: 1.7;
    color: inherit;
}

/* Naslovi */
.ts-travel-content h1,
.ts-travel-content h2,
.ts-travel-content h3,
.ts-travel-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    line-height: 1.3;
    font-weight: 700;
}

.ts-travel-content h1 { font-size: 2em; }
.ts-travel-content h2 { font-size: 1.5em; }
.ts-travel-content h3 { font-size: 1.25em; }
.ts-travel-content h4 { font-size: 1.1em; }

.ts-travel-content h1:first-child,
.ts-travel-content h2:first-child,
.ts-travel-content h3:first-child,
.ts-travel-content h4:first-child {
    margin-top: 0;
}

/* Paragraf */
.ts-travel-content p {
    margin-bottom: 1em;
}

/* Liste */
.ts-travel-content ul,
.ts-travel-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.ts-travel-content li {
    margin-bottom: 0.3em;
}

/* Citat */
.ts-travel-content blockquote {
    border-left: 4px solid #d1d5db;
    padding: 0.75em 1em;
    margin: 1.25em 0;
    background: #f9fafb;
    border-radius: 0 6px 6px 0;
    color: #374151;
    font-style: italic;
}

.ts-travel-content blockquote p {
    margin-bottom: 0;
}

/* Horizontalna linija */
.ts-travel-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.5em 0;
}

/* Linkovi */
.ts-travel-content a {
    text-decoration: underline;
}

/* Slike */
.ts-travel-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    margin-bottom: 1em;
}

/* Razdjelnike između uvoda i plana */
.ts-content-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Elementor Widget: Tabela informacija putovanja (.ts-info-table)
═══════════════════════════════════════════════════════════════════════════ */

.ts-info-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.ts-info-table td,
.ts-info-table th {
    padding: 5px 0;
    border: 0;
    text-align: left;
    font-size: 17px;
    border-bottom: 1px solid #DFDFDF;
    background: transparent !important;
}

.ts-info-table th {
    text-transform: uppercase;
    font-weight: 500;
}

.ts-info-table td {
    font-weight: 600;
}

.ts-info-table tr:hover td,
.ts-info-table tr:hover th {
    background: transparent !important;
}

.ts-info-table tr:last-child td,
.ts-info-table tr:last-child th {
    border-bottom: none;
}

/* =============================================================================
   Elementor Widget: Forma za prijavu na putovanje (.ts-rf-*)
============================================================================= */

/* Wrapper */
.ts-rf-wrap {
    font-family: inherit;
    color: inherit;
}

/* Loading state */
.ts-rf-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px;
    color: #555;
    font-size: 15px;
}

.ts-rf-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #0073aa;
    border-radius: 50%;
    display: inline-block;
    animation: ts-rf-spin 0.7s linear infinite;
}

@keyframes ts-rf-spin {
    to { transform: rotate(360deg); }
}

/* Notice (closed/deadline/full) */
.ts-rf-notice {
    padding: 16px 20px;
    background: #fff8e1;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    color: #92400e;
    font-size: 15px;
}

/* Sections container */
.ts-rf-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

/* Section card */
.ts-rf-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
}

.ts-rf-section__title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

/* Grid 2 columns */
.ts-rf-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .ts-rf-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Field group */
.ts-rf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.ts-rf-field:last-child { margin-bottom: 0; }

.ts-rf-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ts-req {
    color: #ef4444;
    font-size: 14px;
}

.ts-rf-field input[type="text"],
.ts-rf-field input[type="email"],
.ts-rf-field input[type="tel"],
.ts-rf-field input[type="date"],
.ts-rf-field input[type="number"],
.ts-rf-field input[type="file"],
.ts-rf-field select,
.ts-rf-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.ts-rf-field input:focus,
.ts-rf-field select:focus,
.ts-rf-field textarea:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.12);
}

.ts-rf-field textarea {
    resize: vertical;
    min-height: 80px;
}

.ts-rf-file-input {
    padding: 6px !important;
}

.ts-rf-file-preview {
    margin-top: 6px;
}

/* Room type cards */
.ts-rf-room-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (max-width: 500px) {
    .ts-rf-room-grid { grid-template-columns: 1fr; }
}

.ts-rf-room-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    user-select: none;
}

.ts-rf-room-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.ts-rf-room-option:hover {
    border-color: #0073aa;
    background: #f0f7ff;
}

.ts-rf-room-option.ts-rf-room--selected {
    border-color: #0073aa;
    background: #e8f4fd;
}

.ts-rf-room-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.ts-rf-room-price {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Price color variants */
.ts-rf-price--extra {
    color: #dc2626;
    background: #fef2f2;
}

.ts-rf-price--discount {
    color: #16a34a;
    background: #f0fdf4;
}

.ts-rf-price--included {
    color: #6b7280;
    background: #f9fafb;
}

/* Supplement options */
.ts-rf-sup-cat {
    margin-bottom: 12px;
}

.ts-rf-sup-cat > strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ts-rf-sup-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.ts-rf-sup-option:hover {
    background: #f9fafb;
}

.ts-rf-sup-option input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #0073aa;
    cursor: pointer;
}

.ts-rf-sup-name {
    flex: 1;
    font-size: 14px;
    color: #111827;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ts-rf-sup-name small {
    font-size: 12px;
    color: #9ca3af;
}

.ts-rf-sup-price {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Coupon row */
.ts-rf-coupon-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ts-rf-coupon-row .ts-rf-field {
    margin-bottom: 0;
    flex: 1;
}

.ts-rf-btn-outline {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #0073aa;
    color: #0073aa;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
    height: 42px;
    line-height: 1;
    font-family: inherit;
}

.ts-rf-btn-outline:hover {
    background: #0073aa;
    color: #fff;
}

.ts-rf-coupon-msg {
    font-size: 13px;
    margin-top: 6px;
    min-height: 18px;
}

.ts-rf-coupon-msg--success { color: #16a34a; font-weight: 600; }
.ts-rf-coupon-msg--error   { color: #dc2626; }

/* Total price box */
.ts-rf-total {
    margin: 16px 0;
    padding: 14px 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.ts-rf-total__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    color: #111827;
}

.ts-rf-total__row strong {
    font-size: 22px;
    font-weight: 700;
    color: #0073aa;
}

/* Error message */
.ts-rf-error-msg {
    margin: 12px 0;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
}

/* Submit button */
.ts-rf-btn {
    width: 100%;
    padding: 14px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}

.ts-rf-btn:hover:not(:disabled) {
    background: #005a87;
}

.ts-rf-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.ts-rf-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Terms of service */
.ts-rf-terms {
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ts-rf-terms__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

.ts-rf-terms__checkbox {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #0073aa;
}

.ts-rf-terms__label a {
    color: #0073aa;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ts-rf-terms__label a:hover {
    color: #005a87;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Elementor Widget: PDF Preuzimanje (.ts-pdf-*)
═══════════════════════════════════════════════════════════════════════════ */

.ts-pdf-btn-wrap {
    display: flex;
}

.ts-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #c0392b;
    color: #ffffff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    line-height: 1;
}

.ts-pdf-btn:hover {
    background-color: #a93226;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.35);
}

.ts-pdf-btn:active {
    transform: translateY(0);
}

.ts-pdf-btn .ts-pdf-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 16px; /* fallback — Elementor override via icon_size kontrole */
    width: 16px;
    height: 16px;
    overflow: hidden;
}

/* SVG ikona (Elementor renderira <svg> unutar spana) */
.ts-pdf-btn .ts-pdf-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
    flex-shrink: 0;
}

/* Font ikona (Elementor renderira <i> unutar spana) */
.ts-pdf-btn .ts-pdf-icon i {
    font-size: inherit;
    line-height: 1;
}

.ts-pdf-unavailable {
    font-size: 13px;
    color: #9ca3af;
}

/* Success state */
.ts-rf-success {
    text-align: center;
    padding: 40px 24px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
}

.ts-rf-success__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ts-rf-success__title {
    font-size: 22px;
    font-weight: 700;
    color: #15803d;
    margin: 0 0 12px;
}

.ts-rf-success__detail {
    font-size: 15px;
    color: #374151;
    max-width: 480px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Elementor Widget: Status traka putovanja (.ts-sr-*)
═══════════════════════════════════════════════════════════════════════════ */

/*
 * wrapper nema overflow:hidden — reže parent kartica
 * (postavi overflow:hidden + position:relative na parent u Elementoru)
 */
.ts-sr-wrapper {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 100;
}

/*
 * Centriranje trake marginom: left:0 + margin-left:-50%
 * → centar ribbona = centar kartice
 * Elementor angle selektor postavlja samo rotate() — ne dira poziciju
 */
.ts-sr-ribbon {
    position: absolute;
    left: 0;
    margin-left: -50%;
    transform: rotate(-35deg);
    transform-origin: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #E07B2A;
    width: 200%;
    height: 52px;
    top: 40%;
}

.ts-sr-ribbon-text {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: center;
    display: block;
    width: 100%;
}
