/* ==========================================================================
    STYLY PRO PLUGIN PSP VERZE 3 - ZÁKLADNÍ SOUBOR
   ========================================================================== */

.psp-plugin-wrapper *, .psp-plugin-wrapper *::before, .psp-plugin-wrapper *::after {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
    STYLY PRO TABULKY (Můj účet, Přijaté nabídky)
    -------------------------------------------------------------------------- */
.widefat, .psp-muj-ucet-poptavky {
    width: 100% !important;
    margin-top: 20px !important;
    border-collapse: collapse !important;
    font-size: 17px !important;
    border: 2px solid #ccc !important;
    background-color: #ffffff !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
}

.widefat th, .widefat td, .psp-muj-ucet-poptavky th, .psp-muj-ucet-poptavky td {
    padding: 10px 12px !important;
    text-align: left !important;
    border: 1px solid #e5e5e5 !important;
    vertical-align: top !important;
    color: #111111 !important;
    line-height: 1.5 !important;
}

.widefat th, .psp-muj-ucet-poptavky th {
    font-weight: normal;
    background-color: #f9f9f9;
}

.widefat tbody tr:hover, .psp-muj-ucet-poptavky tbody tr:hover {
    background-color: #f9f9f9;
}

.psp-poptavka-details-cell {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.widefat td a, .psp-muj-ucet-poptavky td a {
    text-decoration: none;
    margin-right: 8px;
}

.widefat td a:hover, .psp-muj-ucet-poptavky td a:hover {
    text-decoration: underline;
}

.widefat td a strong, .psp-muj-ucet-poptavky td a strong {
    font-size: 16px !important;
    font-weight: normal !important;
    color: #2271b1 !important;
}

.widefat td a:hover strong, .psp-muj-ucet-poptavky td a:hover strong {
    color: #333333 !important;
}

.widefat td .psp-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.widefat td .psp-meta-item,
.widefat td .psp-offer-summary-line .psp-offer-meta {
    font-size: 0.95em !important;
    color: #111111 !important;
    line-height: 1.7 !important;
    display: inline-flex !important;
    align-items: center;
    margin: 0;
    padding: 0;
}

.widefat td .dashicons {
    font-size: 17px !important;
    vertical-align: middle !important;
    margin-right: 5px !important;
    color: #919191 !important;
}

.widefat td .psp-my-price, .widefat td .psp-accepted-price, .widefat td .psp-nejnizsi-nabidka-tabulka {
    color: #4b44ff !important;
    font-weight: normal !important;
}

.widefat td .psp-accepted-price, .widefat td .psp-nejnizsi-nabidka-tabulka {
    color: #28a745 !important;
}

.widefat td .psp-worker-contact-details {
    font-size: 1.1em !important;
    line-height: 1.6 !important;
    color: #111111 !important;
}
.widefat td .psp-worker-contact-details strong {
    color: #111 !important;
}

.widefat td .psp-worker-contact-details a {
    color: #2271b1 !important;
    text-decoration: none !important;
}
.widefat td .psp-worker-contact-details a:hover {
    text-decoration: underline !important;
}


/* --------------------------------------------------------------------------
    GENERICKÉ STYLY PRO TLAČÍTKA
    -------------------------------------------------------------------------- */
.psp-plugin-wrapper button,
.psp-plugin-wrapper input[type="button"],
.psp-plugin-wrapper input[type="submit"],
.psp-plugin-wrapper .button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    margin: 5px;
}

.psp-plugin-wrapper .button.button-primary,
.psp-plugin-wrapper input[type="submit"].button-primary {
    background-color: #2271b1;
    color: #ffffff;
    border: 1px solid #2271b1;
}
.psp-plugin-wrapper .button.button-primary:hover,
.psp-plugin-wrapper input[type="submit"].button-primary:hover {
    background-color: #1a5e92;
    border-color: #1a5e92;
    color: #ffffff;
}
.psp-plugin-wrapper .button.button-secondary,
.psp-plugin-wrapper #psp-edit-poptavka-form a.psp-button-cancel {
    background-color: #FDFDFD;
    color: #111111;
    border: 1px solid #9ca3af;
}
.psp-plugin-wrapper .button.button-secondary:hover,
.psp-plugin-wrapper #psp-edit-poptavka-form a.psp-button-cancel:hover {
    background-color: #e2e6ea;
    border-color: #dae0e5;
}
.psp-plugin-wrapper .psp-button-delete,
.psp-plugin-wrapper .button.delete {
    background-color: #d63638;
    color: #ffffff;
    border: 1px solid #d63638;
}
.psp-plugin-wrapper .psp-button-delete:hover,
.psp-plugin-wrapper .button.delete:hover {
    background-color: #c82333;
    border-color: #c82333;
}

/* --------------------------------------------------------------------------
    STYLY PRO VÝPISY A DETAILY POPTÁVEK
    -------------------------------------------------------------------------- */
.psp-detail-poptavky-wrapper {
    background-color: #ffffff;
    border: 1px solid #ccc;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}
.psp-detail-poptavky-wrapper h2 {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
    color: #333333;
    text-align: left;
}
.psp-details-flex-container, .poptavka-meta-row, .psp-inquiry-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 15px;
    margin-bottom: 8px;
    font-size: 16px;
    color: #111;
    line-height: 1.6;
}

.psp-details-flex-container .psp-detail-item, .poptavka-meta-row .psp-meta-item {
    display: flex;
    align-items: center;
}
.psp-details-flex-container .psp-detail-item .dashicons, .poptavka-meta-row .psp-meta-item .dashicons {
    margin-right: 5px;
    font-size: 22px;
    color: #919191;
}

.psp-poptavky-list-wrapper .poptavka-item {
    margin-bottom: 20px;
    border: 1px solid #ccc;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}
.psp-poptavky-list-wrapper .poptavka-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}
.psp-poptavky-list .poptavka-title-small {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 0.8em;
    color: #111111;
}
.psp-poptavky-list .poptavka-title-small a {
    text-decoration: none;
    color: inherit;
}
.psp-poptavky-list .poptavka-title-small a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
    STYLY PRO PAGINACI (STRÁNKOVÁNÍ)
    -------------------------------------------------------------------------- */
.psp-pagination, .psp-poptavky-pagination {
    margin-top: 30px;
    text-align: center;
}
.psp-pagination .page-numbers, .psp-poptavky-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    background-color: #fff;
    transition: background-color 0.2s, color 0.2s;
}
.psp-pagination .page-numbers:hover, .psp-poptavky-pagination .page-numbers:hover:not(.current) {
    background-color: #f1f1f1;
    border-color: #ccc;
}
.psp-pagination .page-numbers.current, .psp-poptavky-pagination .page-numbers.current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
    font-weight: bold;
}
.psp-pagination .page-numbers.dots {
    border: none;
    background: none;
}

/* --------------------------------------------------------------------------
    STYLY PRO FORMULÁŘE
    -------------------------------------------------------------------------- */
#psp-edit-poptavka-form, .psp-form {
    width: 100%;
    max-width: 700px;
}
.psp-form p {
    margin-bottom: 18px;
}
.psp-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 17px;
    color: #111;
}
.psp-form input[type="text"], .psp-form input[type="email"], .psp-form input[type="tel"], .psp-form input[type="password"], .psp-form input[type="date"], .psp-form input[type="number"], .psp-form textarea, .psp-form select {
    width: 100%;
    max-width: 450px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 15px;
}
.psp-form textarea {
    min-height: 120px;
}
.psp-form .required {
    color: red;
    font-weight: normal;
    margin-left: 3px;
}
.psp-form small {
    display: block;
    font-size: 0.9em;
    color: #555;
    margin-top: 4px;
}
.psp-form-fieldset {
    border: 1px solid #e0e0e0;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 3px;
}
.psp-form-fieldset legend {
    font-weight: bold;
    padding: 0 10px;
    font-size: 1.1em;
}
.psp-checkbox-list-wrapper {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px 15px;
    background-color: #ffffff;
}
.psp-checkbox-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.psp-checkbox-list li label {
    font-weight: normal;
    display: flex;
    align-items: center;
}
.psp-checkbox-list li input[type="checkbox"] {
    margin-right: 10px;
}
.psp-form-details {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 1rem;
    background-color: #f9f9f9;
}
.psp-form-details summary {
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    outline: none;
    list-style: none;
}
.psp-form-details summary::-webkit-details-marker {
    display: none;
}
.psp-form-details summary:before {
    content: '▶';
    margin-right: 0.5rem;
    font-size: 0.8em;
    display: inline-block;
    transition: transform 0.2s;
}
.psp-form-details[open] > summary:before {
    transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
    STYLY PRO SYSTÉMOVÉ ZPRÁVY
    -------------------------------------------------------------------------- */
.psp-message {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.psp-message-error, .psp-form-errors {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}
.psp-message-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.psp-message-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

/* --------------------------------------------------------------------------
    STYLY PRO VÝPIS NABÍDEK
    -------------------------------------------------------------------------- */
.psp-offers-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
li.psp-offer-item {
    border: 1px solid #ddd;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    background-color: #ffffff;
}
.psp-offer-item .psp-offer-summary-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
}
.psp-offer-full-details {
    padding: 15px;
    border-top: 1px dashed #ccc;
    background-color: #f9f9f9;
    margin-top: 15px;
}
.psp-offer-full-details.is-hidden {
    display: none;
}
.psp-stars-display .dashicons {
    color: #f9a602;
    font-size: 22px;
}

/* --------------------------------------------------------------------------
    RESPONZIVNÍ ÚPRAVY PRO TABULKY
    -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
    .psp-muj-ucet-poptavky thead {
        display: none;
    }
    .psp-muj-ucet-poptavky tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 3px;
    }
    .psp-muj-ucet-poptavky td {
        display: block;
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px dotted #eee;
    }
    .psp-muj-ucet-poptavky td:last-child {
        border-bottom: none;
    }
    .psp-muj-ucet-poptavky td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
    }
}