/* Termofold Figyelo - Frontend Styles */
/*
 * Colour palette aligned with AgroVision FSE:
 *   Primary green  : #47a14a
 *   Dark green     : #0b5b2c
 *   Light green bg : #eef7ee
 */

/* Forms */
.tf-form {
    max-width: 480px;
}

.tf-form-group {
    margin-bottom: 16px;
}

.tf-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.tf-form-group input[type="text"],
.tf-form-group input[type="email"],
.tf-form-group input[type="password"],
.tf-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}

.tf-form-group input:focus,
.tf-form-group select:focus {
    border-color: #47a14a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(71, 161, 74, 0.2);
}

.tf-form-group small {
    display: block;
    color: #666;
    margin-top: 4px;
    font-size: 12px;
}

.tf-field-static {
    margin: 0;
    padding: 10px 0;
    font-size: 15px;
    color: #444;
}

.tf-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.tf-form-group--checkbox {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}

.tf-form-group--checkbox input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
    flex-shrink: 0;
}

.tf-form-group--checkbox label {
    font-weight: normal;
    margin-bottom: 0;
    flex: 1;
}

.tf-field-error {
    display: block;
    width: 100%;
    color: #c0392b;
    font-size: 13px;
    margin-top: 2px;
}

/* Buttons */
.tf-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.tf-btn-primary {
    background: #47a14a;
    color: #fff;
}

.tf-btn-primary:hover {
    background: #0b5b2c;
    color: #fff;
}

.tf-btn-secondary {
    background: #e2e2dc;
    color: #333;
    border: 1px solid #c8c8c0;
}

.tf-btn-secondary:hover {
    background: #d4d4ce;
}

.tf-btn-danger {
    background: #dc3545;
    color: #fff;
}

.tf-btn-danger:hover {
    background: #c82333;
}

.tf-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* Notices */
.tf-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.tf-notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.tf-notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.tf-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.tf-notice-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Auth forms */
.tf-auth-form {
    max-width: 480px;
    margin: 0 auto;
}

.tf-auth-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

/* Pricing */
.tf-pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.tf-pricing-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tf-pricing-card:hover {
    border-color: #47a14a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tf-pricing-card h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.tf-pricing-card .tf-price {
    font-size: 28px;
    font-weight: 700;
    color: #47a14a;
    margin: 12px 0;
}

.tf-pricing-card .tf-price small {
    font-size: 14px;
    font-weight: 400;
    color: #666;
}

.tf-pricing-card .tf-features {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    text-align: left;
}

.tf-pricing-card .tf-features li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.tf-pricing-card .tf-features li::before {
    content: "\2713";
    color: #47a14a;
    font-weight: bold;
    margin-right: 8px;
}

.tf-pricing-durations {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 16px;
}

.tf-pricing-card--blocked {
    opacity: 0.55;
    border-color: #ccc;
}

.tf-pricing-card--blocked:hover {
    border-color: #ccc;
    box-shadow: none;
}

.tf-pricing-blocked-notice {
    font-size: 13px;
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 12px 0 4px;
}

.tf-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #aaa;
    color: #fff;
}

/* Checkout */
.tf-checkout {
    max-width: 600px;
}

.tf-checkout-note {
    font-size: 15px;
    color: #666;
    margin-bottom: 12px;
}

.tf-checkout-summary {
    background: #eef7ee;
    border-radius: 8px;
    padding: 10px 30px 20px;
    margin-bottom: 24px;
}

/* Billing fields (checkout + dashboard) */
.tf-checkout-billing {
    margin-top: 48px;
    margin-bottom: 24px;
}

.tf-checkout-billing h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.tf-billing-note {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
}

.tf-billing-row {
    margin-bottom: 0;
}

.tf-billing-row .tf-form-group {
    margin-bottom: 12px;
}

.tf-billing-row input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
}

.tf-billing-row input[type="text"]:focus {
    border-color: #47a14a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(71, 161, 74, 0.2);
}

.tf-billing-row-split {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
}

.tf-billing-form .tf-billing-row-split {
    grid-template-columns: 120px 1fr;
}

.tf-required {
    color: #c0392b;
}

.tf-optional {
    font-weight: normal;
    font-size: 12px;
    color: #888;
}

/* Dashboard */
.tf-dashboard {
    max-width: 1060px;
}

.tf-dashboard-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-top: 24px;
}

.tf-dashboard-main {
    flex: 1;
    min-width: 0;
}

.tf-dashboard-section {
    margin-bottom: 32px;
}

.tf-dashboard-section h2 {
    font-size: 18px;
    border-bottom: 2px solid #47a14a;
    padding-bottom: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.tf-item-counter {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: #555;
    background: #e8e8e3;
    border-radius: 10px;
    padding: 2px 10px;
    white-space: nowrap;
}

.tf-watching-info {
    font-size: 13px;
    color: #666;
    margin: 4px 0 10px;
}

.tf-subscription-panel+.tf-subscription-panel {
    margin-top: 80px;
}

#tf-subscription-section .tf-dashboard-section+.tf-dashboard-section {
    margin-top: 80px;
}

/* Sidebar */
.tf-dashboard-sidebar {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
}

.tf-sidebar-nav {
    background: #f8f8f5;
    border-radius: 8px;
    padding: 8px 0 12px;
}

.tf-sidebar-group {
    padding: 16px 16px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #999;
}

.tf-sidebar-group:first-child {
    padding-top: 12px;
}

.tf-sidebar-link {
    display: block;
    padding: 7px 16px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.tf-sidebar-link:hover {
    background: #eef7ee;
    color: #0b5b2c;
    border-left-color: #47a14a;
}

.tf-sidebar-link.tf-active {
    background: #eef7ee;
    color: #0b5b2c;
    border-left-color: #47a14a;
    font-weight: 600;
}

.tf-section-desc {
    margin: -8px 0 16px;
    font-size: 14px;
    color: #666;
}

.tf-info-box {
    background: #eef7ee;
    border-left: 4px solid #47a14a;
    padding: 16px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 16px;
}

.tf-warning-box {
    background: #fff3cd;
    border-left: 4px solid #f9a825;
    padding: 16px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 16px;
}

.tf-details-table {
    width: 100%;
    border-collapse: collapse;
}

.tf-details-table td {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.tf-details-table td:first-child {
    font-weight: 600;
    width: 40%;
    color: #555;
}

/* Watching section plan label in heading */
.tf-watching-plan-label {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    margin-left: 8px;
}

/* HRSZ list */
.tf-hrsz-list {
    list-style: none;
    padding: 0;
}

.tf-hrsz-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 6px;
    background: #f8f8f5;
    border-radius: 6px;
}

.tf-hrsz-item code {
    font-size: 15px;
    font-weight: 600;
}

/* HRSZ add form row */
.tf-add-hrsz {
    margin-top: 12px;
}

.tf-hrsz-add-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.tf-settlement-field {
    flex: 1 1 200px;
    min-width: 160px;
}

.tf-hrsz-add-row>.tf-hrsz-input,
.tf-hrsz-input-wrap .tf-hrsz-input {
    flex: 0 1 130px;
    min-width: 100px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    width: 100%;
}

.tf-hrsz-add-row>.tf-hrsz-input:focus,
.tf-hrsz-input-wrap .tf-hrsz-input:focus {
    border-color: #47a14a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(71, 161, 74, 0.2);
}

.tf-hrsz-input-wrap {
    display: block;
    flex: 0 1 130px;
    min-width: 100px;
}

.tf-prefix-preview {
    font-size: 12px;
    font-weight: 600;
    color: #47a14a;
    font-family: monospace;
    min-height: 1.3em;
    margin-top: 3px;
}

.tf-hrsz-add-row>.tf-btn {
    flex-shrink: 0;
    align-self: flex-start;
}

/* Settlement searchable dropdown */
.tf-settlement-wrapper {
    position: relative;
    display: flex;
}

.tf-settlement-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    box-sizing: border-box;
    cursor: pointer;
    background: #fff;
}

.tf-settlement-input:focus {
    border-color: #47a14a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(71, 161, 74, 0.2);
}

.tf-settlement-toggle {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 0 6px 6px 0;
    background: #f5f5f0;
    color: #444;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
}

.tf-settlement-toggle:hover {
    background: #e8e8e3;
}

.tf-settlement-dropdown {
    display: none;
    position: absolute;
    z-index: 999;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tf-settlement-dropdown li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.tf-settlement-dropdown li:hover,
.tf-settlement-dropdown li.tf-dropdown-active {
    background: #eef7ee;
    color: #0b5b2c;
}

/* Notifications list */
.tf-notifications-list {
    list-style: none;
    padding: 0;
}

.tf-notification-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 6px;
    background: #f8f8f5;
    border-radius: 6px;
    border-left: 4px solid #47a14a;
}

.tf-notification-item.unread {
    background: #eef7ee;
    font-weight: 500;
}

.tf-notification-body {
    flex: 1;
}

.tf-notification-date {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.tf-notification-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.tf-notification-dismiss:hover {
    color: #666;
    background: #e0e0d8;
}

.tf-notif-badge {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    background: #c0392b;
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
}

.tf-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.tf-pagination #tf-notif-page-info {
    font-size: 13px;
    color: #666;
}

/* Status badges */
.tf-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.tf-badge-active {
    background: #d4edda;
    color: #155724;
}

.tf-badge-pending {
    background: #fff3cd;
    color: #856404;
}

.tf-badge-expired {
    background: #f8d7da;
    color: #721c24;
}


/* Contact page */
.tf-contact {
    max-width: 540px;
}

.tf-contact-block {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e8e8e0;
}

.tf-contact-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tf-contact-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1a1a1a;
}

.tf-contact-address {
    margin: 0 0 8px;
    color: #444;
}

.tf-contact-meta {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.tf-contact-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 8px;
}

.tf-contact-label {
    font-weight: 600;
    min-width: 60px;
    color: #555;
    font-size: 14px;
}

.tf-contact-row a {
    color: #2d6a4f;
    text-decoration: none;
}

.tf-contact-row a:hover {
    text-decoration: underline;
}

/* ── Responsive: dashboard nav moves above content on narrow screens ── */
@media (max-width: 700px) {
    .tf-dashboard-layout {
        flex-direction: column;
        gap: 16px;
    }

    .tf-dashboard-sidebar {
        width: 100%;
        position: static;
        order: -1;
    }

    .tf-sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
        padding: 6px 8px;
        border-radius: 8px;
    }

    .tf-sidebar-group {
        display: none;
    }

    .tf-sidebar-link {
        white-space: nowrap;
        border-left: none !important;
        border-bottom: 3px solid transparent;
        padding: 7px 12px;
        border-radius: 4px 4px 0 0;
    }

    .tf-sidebar-link:hover {
        border-left-color: transparent !important;
        border-bottom-color: #47a14a;
    }

    .tf-sidebar-link.tf-active {
        border-left-color: transparent !important;
        border-bottom-color: #47a14a;
    }
}