/*
 Theme Name: Carstation-pay
 Author: AndreyIvchenko
 Description: Custom Carstation-pay site
 Version: 1.0
 Text Domain: carstation-pay
*/

:root {
    --blue: #007bff;
    --indigo: #6610f2;
    --purple: #6f42c1;
    --pink: #e83e8c;
    --red: #dc3545;
    --orange: #fd7e14;
    --yellow: #ffc107;
    --green: #28a745;
    --teal: #20c997;
    --cyan: #17a2b8;
    --white: #fff;
    --gray: #6c757d;
    --gray-dark: #343a40;
    --primary: #007bff;
    --secondary: #6c757d;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #343a40;
    --breakpoint-xs: 0;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

* {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body.admin-bar {
    top: 32px;
}

h5 {
    margin: 0;
    padding: 0;
}

html {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: var(--font-family-sans-serif);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: left;
    margin: 0;
    padding: 0;
}

/* Navbar styles */
.navbar {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    flex-flow: row nowrap;
    justify-content: flex-start;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1rem;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.footer-links .container {
    padding: 0 225px;
}

.navbar-brand {
    margin-right: auto;
}

.navbar-brand img {
    height: 60px;
    width: 180px;
    display: inline-block;
    vertical-align: top;
}

.navbar-menu {
    display: flex;
    align-items: center;
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
    justify-content: flex-end;
}

.navbar-nav li {
    margin-left: 1.5rem;
    list-style: none;
    padding: 8px;
}

.navbar-nav li a:hover {
    color: #0e0f11;
}

.nav-link {
    font-family: var(--font-family-sans-serif);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #343a40 !important;
    text-decoration: none;
    background-color: transparent;
    padding: 0;
    text-align: right;
}

/* Toggler button */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") center / 100% no-repeat;
}

a {
    text-decoration: none;
    color: #343a40;
}

/* Front page */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-family-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: left;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--white, #fff);
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
    width: 260px;
    margin: 10px;
}

.card-img-top {
    width: 120px;
    margin: 0 auto;
    padding-top: 10px;
}

.card-body {
    padding: 1.25rem;
    text-align: left;
    flex: 1 1 auto;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--gray-dark, #343a40);
}

.card-text {
    margin-bottom: 1rem;
    color: var(--gray, #6c757d);
}

.btn {
    display: inline-block;
    font-weight: 400;
    color: var(--white, #fff);
    text-align: center;
    vertical-align: middle;
    background-color: var(--primary, #007bff);
    border: 1px solid var(--primary, #007bff);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.btn:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* Footer */
.site-footer {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-family-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    box-sizing: border-box;
    display: block;
    background-color: var(--light, #f8f9fa);
    text-align: left;
    color: var(--gray, #6c757d);
    margin-top: 20px;
}

.footer-links {
    padding: 1rem 0;
}

.footer-row {
    display: contents;
    margin-left: -15px;
    margin-right: -15px;
    width: 100%;
}

.footer-col {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
    margin-bottom: 1.5rem;
    display: contents;
}

.footer-col-left {
    text-align: left;
}

.footer-col-right {
    text-align: right;
}

.footer-col h6 {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

.footer-link {
    color: var(--gray, #6c757d);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}

.footer-link:hover {
    color: var(--gray-dark, #343a40);
}

.footer-bottom {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.025);
    padding: 1.5rem 0;
}

.footer-bottom .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.payment-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0;
    margin-bottom: 1rem;
}

.payment-link {
    display: inline-block;
    margin: 4px;
    padding: .35rem 1.5rem !important;
}

.payment-img {
    height: 60px;
    width: auto;
    vertical-align: middle;
}

.payment-img[alt="Mastercard"] {
    height: 80px;
}

a.footer-link {
    font-size: 16px;
}

/* Modal styles */
.carstation-modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: none;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.carstation-modal.active {
    display: block;
}

.carstation-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    margin: 10vh auto;
    background-color: var(--white, #fff);
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #212529;
}

.carstation-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.carstation-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--gray-dark, #343a40);
}

.carstation-modal-body {
    position: relative;
    padding: 1rem;
    overflow-y: auto;
    max-height: 60vh;
}

.carstation-modal-body p {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.carstation-modal-body p strong {
    flex: 0 0 40%;
    text-align: left;
}

.carstation-modal-body p span {
    flex: 0 0 60%;
    text-align: right;
}

.carstation-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    gap: 0.5rem;
}

.carstation-close {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.5;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.carstation-close:hover {
    opacity: 0.75;
}

.carstation-btn-danger {
    color: var(--white, #fff);
    background-color: var(--danger, #dc3545);
    border-color: var(--danger, #dc3545);
}

.carstation-btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Buy page */
.carstation-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.carstation-park-pay {
    max-width: 100%;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: var(--white, #fff);
    border-radius: 0.25rem;
}

.carstation-form-group {
    margin-bottom: 1.5rem;
}

.carstation-form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-dark, #343a40);
}

.carstation-form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: var(--white, #fff);
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.carstation-form-control:focus {
    border-color: var(--primary, #007bff);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.carstation-form-control:invalid:not(:focus) {
    border-color: var(--danger, #dc3545);
}

.carstation-text-uppercase {
    text-transform: uppercase;
}

.carstation-invalid-feedback {
    display: none;
    color: var(--danger, #dc3545);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.carstation-form-control:invalid:not(:focus) ~ .carstation-invalid-feedback {
    display: block;
}

.carstation-custom-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 0.5rem;
}

.carstation-custom-control-input {
    margin-right: 0.5rem;
}

.carstation-custom-control-label {
    font-size: 1rem;
    color: var(--gray-dark, #343a40);
}

.carstation-note-label {
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray, #6c757d);
}

.carstation-note {
    font-size: 0.75rem;
    color: var(--gray, #6c757d);
    display: block;
    margin-bottom: 1rem;
}

.carstation-row {
    display: flex;
    flex-wrap: wrap;
}

.carstation-justify-content-center {
    justify-content: center;
}

.carstation-align-items-center {
    align-items: center;
}

.carstation-btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.carstation-btn-outline-primary {
    color: var(--primary, #007bff);
    background-color: transparent;
    border: 1px solid var(--primary, #007bff);
}

.carstation-btn-outline-primary:hover:not(:disabled) {
    background-color: var(--primary, #007bff);
    color: var(--white, #fff);
}

.carstation-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Стили для полей даты и времени */
.carstation-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.carstation-col {
    flex: 1 0 0%;
    padding-left: 15px;
    padding-right: 15px;
    min-width: 150px;
}

.carstation-time-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.carstation-time-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    position: relative;
}

.carstation-time-input {
    width: 100%;
    text-align: center;
    padding: 0.375rem 0;
    font-size: 0.875rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    height: 30px;
}

.carstation-btn-link {
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    color: var(--primary, #007bff);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carstation-btn-link:hover {
    color: #0056b3;
}

.carstation-chevron {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid currentColor;
}

.carstation-chevron-bottom {
    border-bottom: none;
    border-top: 5px solid currentColor;
}

.carstation-time-input-container .carstation-increment {
    order: 1;
    margin-bottom: 2px;
}

.carstation-time-input-container .carstation-time-input {
    order: 2;
}

.carstation-time-input-container .carstation-decrement {
    order: 3;
    margin-top: 2px;
}

.carstation-time-spacer {
    font-size: 1rem;
    margin: 0 0.5rem;
}

.carstation-form-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--font-family-sans-serif);
}

.carstation-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.carstation-checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.carstation-checkbox-label {
    margin-left: 8px;
    font-size: 14px;
}

.carstation-date-time-picker {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.carstation-date-input {
    flex: 2;
    min-width: 120px;
}

.carstation-btn:not(:disabled) {
    cursor: pointer;
    opacity: 1;
}

.carstation-btn:not(:disabled):hover {
    color: var(--white);
    background-color: var(--primary);
    border-color: var(--primary);
    opacity: 1;
}

.carstation-btn:disabled {
    cursor: not-allowed;
    opacity: .5;
    color: var(--primary);
    background-color: transparent;
    border-color: var(--primary);
}

/* Стили для формы поиска */
.carstation-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 450px; /* Slightly reduced total width */
}

.carstation-input-group .carstation-form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
    flex: 0 0 60%; /* Narrower input */
    max-width: 270px; /* Fixed max width for input */
}

.carstation-input-group-append {
    display: flex;
    flex: 0 0 40%; /* Wider button */
}

.carstation-input-group-append .carstation-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
    padding: 0.375rem 1rem;
    width: 100%;
    min-width: 180px; /* Ensure button is wide enough for text */
}

/* Стили для таблицы результатов поиска */
.carstation-park-pay .wp-list-table {
    margin-top: 1.5rem;
    width: 100%;
    border: none; /* Remove table border */
    border-collapse: collapse;
}

.carstation-park-pay .wp-list-table thead {
    background-color: #dee2e6; /* Grey header stripe */
}

.carstation-park-pay .wp-list-table th {
    padding: 0.75rem;
    vertical-align: middle;
    border: none; /* Remove borders */
    background-color: transparent; /* Ensure header cells inherit thead background */
    font-weight: 500;
}

.carstation-park-pay .wp-list-table td {
    padding: 0.75rem;
    vertical-align: middle;
    border: none; /* Remove borders */
}

/* Alternating row colors for search results */
.carstation-park-pay .wp-list-table tbody tr:nth-child(odd) {
    background-color: var(--white, #fff); /* White background for odd rows */
}

.carstation-park-pay .wp-list-table tbody tr:nth-child(even) {
    background-color: #e9ecef; /* Grey background for even rows */
}

.carstation-park-pay .wp-list-table tbody tr:hover {
    background-color: #d6d8db; /* Slightly darker hover effect */
}

.carstation-button {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Стили для выпадающего списка парковок */
.carstation-form-control select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23495057'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 0.75rem center/12px 12px;
    padding-right: 2rem;
}

.carstation-form-control option {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Стили для отображения стоимости */
.carstation-cost-display {
    font-size: 1rem;
    color: var(--gray-dark, #343a40);
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Стили для колонки ГРН */
.carstation-park-pay .wp-list-table th:nth-child(6),
.carstation-park-pay .wp-list-table td:nth-child(6) {
    width: 100px;
    text-align: right;
}

/* Responsive adjustments */
.carstation-col-sm-6 {
    max-width: 50%;
}

@media (max-width: 576px) {
    .carstation-col-sm-6 {
        max-width: 100%;
    }
    .carstation-input-group {
        max-width: 100%; /* Full width on small screens */
    }
    .carstation-input-group .carstation-form-control {
        max-width: none; /* Allow input to take available space */
        flex: 0 0 55%; /* Slightly adjust for small screens */
    }
    .carstation-input-group-append .carstation-btn {
        min-width: 120px; /* Smaller minimum width for button */
        flex: 0 0 45%;
    }
}

/* Responsive 768px */
@media (max-width: 768px) {
    .footer-row {
        text-align: center;
    }
    
    .footer-links .container {
        padding: 0px;
    }

    .footer-col {
        flex: 0 0 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
    }

    .payment-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .payment-link {
        flex: 0 0 45%;
        max-width: 45%;
        text-align: center;
    }

    .payment-link:nth-child(1),
    .payment-link:nth-child(2) {
        order: 1;
    }

    .payment-link:nth-child(3),
    .payment-link:nth-child(4) {
        order: 2;
    }

    .carstation-modal-content {
        max-width: 90%;
        margin: 5vh auto;
    }
}

/* Responsive 576px */
@media (max-width: 576px) {
    .navbar-brand img {
        height: 40px;
        width: auto;
    }

    .navbar-toggler {
        display: block;
    }

    .navbar-menu {
        display: none;
        width: 100%;
        padding: 1rem 0;
    }

    .navbar-menu.active {
        display: block;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar-nav li {
        margin: 0.5rem 0;
    }

    .nav-link {
        text-align: left;
        padding: 0;
    }

    .card {
        width: 100%;
        max-width: 300px;
    }

    .payment-img {
        height: 50px;
    }

    .payment-img[alt="Mastercard"] {
        height: 60px;
    }

    .payment-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }

    .payment-link {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }

    .payment-link:nth-child(1) {
        order: 1;
    }

    .payment-link:nth-child(2) {
        order: 2;
    }

    .payment-link:nth-child(3),
    .payment-link:nth-child(4) {
        flex: 0 0 45%;
        max-width: 45%;
        order: 3;
    }
}