/* Global styles */
:root {
    --bs-primary: #1E3674;
    --bs-primary-rgb: 30, 54, 116;
}

/* Typography overrides - PANAŠINTA, kad naudoti Bootstrap RFS (Responsive Font Sizes) */
h1, .h1 { font-size: 2.0rem; } /* Buvo 40px, dabar ~32px */
h2, .h2 { font-size: 1.75rem; }
h3, .h3 { font-size: 1.5rem; }
h4, .h4 { font-size: 1.25rem; }
h5, .h5 { font-size: 1.1rem; }
h6, .h6 { font-size: 1.0rem; }

.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-outline-secondary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
}

.sub-user-notification-bar {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    background-color: #e9ecef;
    border-bottom: 1px solid #ced4da;
    /* Jei norite, kad ši juosta būtų fiksuota po pagrindiniu meniu (kuris taip pat fixed-top): */
    /* position: fixed; */
    /* top: 56px; */ /* Turi atitikti pagrindinio meniu aukštį */
    /* left: 0; */
    /* right: 0; */
    /* z-index: 1029; */
}
.sub-user-notification-bar .btn-sm {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
}
/* Jei sub-user-notification-bar yra fixed, reikės šio stūmiklio turiniui */
/* .content-pusher-sub-user { padding-top: 45px; } */ /* Pakoreguokite aukštį pagal juostos aukštį */

/* PANAŠINTA: Ištrintos pasikartojančios ir 'nowrap' taisyklės */
/*
table td,
table th {
    white-space: nowrap;
}

#invoice_items_table td,
#invoice_items_table th{
    white-space: nowrap;
}
*/

.modal-content,
.modal-header,
.modal-body,
.modal-footer{
    background-color:#fff!important;
}

/* Home page styles */

/* --- Modern Section Styles --- */
.section-hero {
    background-color: #fff !important;
    position: relative;
}

.hero-blob-bg {
    background: radial-gradient(circle at center, rgba(var(--bs-primary-rgb), 0.1) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
}

/* Floating shapes */
.shape-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.6;
}
.shape-blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(var(--bs-primary-rgb), 0.15);
    animation: floatBlob 20s infinite alternate;
}
.shape-blob-2 {
    bottom: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(13, 202, 240, 0.15); /* Info/Cyan color */
    animation: floatBlob 15s infinite alternate-reverse;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(20deg); }
}

.text-primary-light { color: #a6b5ff; }

/* Spacing utilities */
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }
.mb-6 { margin-bottom: 4rem; }
.mw-700 { max-width: 700px; }
.min-vh-50 { min-height: 50vh; }

/* Tracking */
.tracking-wider { letter-spacing: 0.05em; }

/* Plan Cards */
.plan-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.hover-lift-lg:hover {
    transform: translateY(-10px);
    box-shadow: 0 1.5rem 4rem rgba(var(--bs-primary-rgb), 0.15) !important;
}
.scale-105 { transform: scale(1.05); }
.border-top-primary { border-top: 4px solid var(--bs-primary) !important; }

/* Buttons */
.btn-hover-scale { transition: transform 0.2s ease; }
.btn-hover-scale:hover { transform: scale(1.05); }

.btn-hover-glow { transition: all 0.3s ease; }
.btn-hover-glow:hover { box-shadow: 0 0 20px rgba(var(--bs-primary-rgb), 0.4); transform: translateY(-2px); }

/* Features */
.gradient-icon-bg {
    background: linear-gradient(135deg, #f0f4ff 0%, #e0eaff 100%);
}

/* Shadows */
.drop-shadow-xl { filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15)); }

/* Dark Contact Card */
.bg-dark { background-color: #1e2129 !important; }
.icon-square {
    width: 50px; 
    height: 50px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

/* Overrides for clarity */
.display-3 { font-size: 3.5rem; }
.display-5 { font-size: 2.5rem; }
@media (max-width: 768px) {
    .display-1 { font-size: 3rem; }
    .display-3 { font-size: 2.5rem; }
    .display-5 { font-size: 2.5rem; }
    .scale-105 { transform: scale(1); margin-top: 1rem; margin-bottom: 1rem;}
    .shape-blob { display: none; } /* Improve mobile performance */
}

/* Old styles cleanup/overrides where necessary */
.hero {
    background-color: transparent; /* Overridden by .section-hero */
    padding: 0; /* Reset */
    text-align: left; /* Reset */
}

.hero p { font-size: inherit; margin-bottom: inherit; }
.hero-image { margin: 0 auto; max-width: 100%; height: auto; }

/* Plan card specific resets */
.plan-title { font-size: inherit; font-weight: inherit; color: inherit; margin-bottom: inherit; }
.plan-price { font-size: inherit; font-weight: inherit; line-height: inherit; margin-bottom: inherit; }
.plan-features { list-style: none; padding-left: 0; margin: 0; }
.plan-features li { margin-bottom: 0; display: flex; }


/* Subscription form styles */
.duration-options-adjust .btn-check:checked + .btn,
.duration-options-adjust .btn.active,
.duration-options-adjust .btn:active,
.duration-options-adjust .show>.btn.dropdown-toggle {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}
.duration-options-adjust .btn:hover {
    color: var(--bs-primary);
}
.duration-options-adjust .btn-group { width: 100%; }
.duration-options-adjust .btn { padding: 0.75rem 1rem; font-size: 0.95rem; line-height: 1.3; }
.duration-options-adjust .price-label { font-weight: bold; display: block; font-size: 1.1em; }
.duration-options-adjust .price-sublabel { font-size: 0.85em; color: #6c757d; display: block; }
.duration-options-adjust .btn-check:checked + .btn .price-sublabel { color: rgba(255, 255, 255, 0.75); }

.addon-selection .form-check {
    display: flex;
    align-items: flex-start;
    padding: 0.85rem 1.25rem;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    margin-bottom: .5rem;
    background-color: #fff;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
.addon-selection .form-check:hover { border-color: #a1a8af; }
.addon-selection .form-check-input { margin-top: .3em; flex-shrink: 0; }
.addon-selection .form-check-label { 
    margin-left: .75em; 
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}
.addon-selection .form-check-label small {
    flex-basis: 100%;
    margin-top: 0.25rem;
}
.addon-price-label { font-weight: bold; color: var(--bs-primary); }

.summary-box { background-color: #f8f9fa; border: 1px solid #dee2e6; border-radius: .375rem; }
.summary-box .summary-item { display: flex; justify-content: space-between; padding: .5rem 0; border-top: 1px solid #e9ecef; }
.summary-box .summary-item:first-child { border-top: none; }
.summary-box .summary-total { font-size: 1.25rem; font-weight: bold; padding-top: .75rem; margin-top: .5rem; border-top: 2px solid #dee2e6;}

@media (max-width: 767.98px) {
    .duration-options-adjust .btn-group {
        flex-direction: column;
    }
    .duration-options-adjust .btn-group > .btn {
        border-radius: .375rem !important;
        margin-bottom: .5rem;
    }
    .duration-options-adjust .btn-group > .btn:last-child {
        margin-bottom: 0;
    }
}

/* Plan adjustment form styles */
.plan-card-adjust {
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    padding: 1rem 1.25rem;
    margin-bottom: .75rem;
    cursor: pointer;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.plan-card-adjust:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
}
.plan-card-adjust.selected {
    border-color: var(--bs-primary);
    background-color: #f8f9fa; /* Or a lighter version of primary */
}
.plan-card-adjust.disabled {
    cursor: not-allowed;
    background-color: #e9ecef;
    opacity: 0.7;
}
.plan-card-adjust.disabled:hover {
    border-color: #dee2e6;
    box-shadow: none;
}
.plan-card-adjust .form-check-input {
    margin-top: .3em;
}
.plan-details-small {
    font-size: 0.9em;
    color: #6c757d;
}

/* Subscription list item styles */
.subscription-list-item {
    border: 1px solid #e3e3e3;
    border-radius: .25rem;
    margin-bottom: 1rem;
    background-color: #fff;
}
.subscription-list-item .card-header {
    background-color: #f8f9fa;
    font-weight: bold;
}
.subscription-list-item p { margin-bottom: 0.3rem; font-size: 0.95rem;}
.subscription-list-item strong {color: #333;}
.status-badge {font-size: 0.8em; padding: .3em .6em; vertical-align: middle;}
.status-active {background-color: var(--bs-success); color: white;}
.status-pending_payment, .status-pending_confirmation {background-color: var(--bs-warning); color: black;}
.status-cancelled {background-color: var(--bs-secondary); color: white;}
.status-expired, .status-failed_payment {background-color: var(--bs-danger); color: white;}

/* =================================
   Unified Card & Form Section Styles
   ================================= */
.card {
    border: 1px solid #e3e3e3;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.card-header {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 1px solid #e3e3e3;
}

/* Form section styles */
.form-section {
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    margin-bottom: 2rem;
}
.form-section h4 {
    border-bottom: 1px solid #ced4da;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.hidden-field { display: none !important; }

/* =================================
   Unified Table Styles
   ================================= */

/* Bendri lentelių stiliai, suderinti su Bootstrap */
.table {
    font-size: 0.9rem; /* Šiek tiek sumažintas šriftas geresniam info talpinimui */
}

.table th,
.table td {
    vertical-align: middle;
    /* white-space: nowrap; PANAŠINTA: Leidžiame tekstui persikelti, kad būtų geriau pritaikyta mobiliems */
}

.table thead th {
    background-color: #f8f9fa; /* Šviesiai pilkas fonas antraštėms */
    border-bottom-width: 2px;
    white-space: nowrap;
}

/* Veiksmų mygtukų stiliai lentelėse */
.action-buttons {
    white-space: nowrap; /* Veiksmų mygtukams paliekame nowrap, kad neišsiskirstytų */
    text-align: right;   /* Lygiuojame į dešinę */
}
/* Pakeičiame į flexbox, kad būtų lengviau valdyti tarpus ir lygiavimą */
.action-buttons {
    display: flex;
    flex-wrap: nowrap; /* Neleidžiame keltis į kitą eilutę */
    justify-content: flex-end; /* Lygiuojame į dešinę */
    gap: 0.35rem; /* Tarpas tarp elementų */
}

.action-buttons form {
    /* PANAŠINTA: Nebereikia margin, nes naudojame gap */
    display: inline-block; /* Paliekame, kad veiktų su mygtukais vienoje eilutėje */
}

/* Papildomi stiliai nuosekliam mygtukų atvaizdavimui */
.btn .bi {
    vertical-align: text-bottom; /* Geriau centruoja ikonas mygtuke */
    margin-right: 0.25rem; /* Mažas tarpelis tarp ikonos ir teksto */
}

/* Mygtukams, kurie turi tik ikoną, panaikiname tarpelį */
.btn-icon .bi {
    margin-right: 0;
}
/* =================================
   End of Unified Table Styles
   ================================= */


/* Statuso žymų stiliai */
.status-paid {
    color: var(--bs-success);
    font-weight: bold;
}
.status-unpaid {
    color: var(--bs-danger);
    font-weight: bold;
}

/* PANAŠINTA: Senas .action-buttons stilius, kuris nebereikalingas */
/*
.action-buttons form {
    display: inline-block;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}
*/
/* Admin client subscriptions list styles - SUVIENODINTA su .action-buttons */
/* PANAŠINTA: Nebereikalingas, nes .action-buttons jau bendrinis */
/*
.action-buttons .btn,
.action-buttons form {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}
*/

/* Select2 overrides */
.select2-container .select2-selection--single { height: calc(1.5em + .75rem + 2px); }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

/* Domain checker styles */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    color: white;
    text-align: center;
}

/* New About & Contact Section */
.about-contact-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.08);
}

.about-logo {
    max-height: 40px;
}

.contact-side {
    background-color: var(--bs-primary);
}

.contact-side a {
    text-decoration: none;
    transition: opacity 0.2s;
}

.contact-side a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Change navbar toggler icon to X when open */
.navbar-toggler:not(.collapsed) .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba(0,0,0,.55)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 14L14 2M2 2l12 12'/%3e%3c/svg%3e");
}
