/* ============================================================
   PrestaPriceDropAlert — frontend CSS v7.1.0
   Moderní, čistý design — kompatibilní s Bootstrap 4/5
   ============================================================ */

/* --- Trigger tlačítko --- */
.pda-trigger-wrap {
    float: left;
    margin-left: 12px;
    padding-left: 14px;
    border-left: 1px solid #ddd;
}

.pda-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    color: #222222;
}

.pda-trigger-btn:hover,
.pda-trigger-btn:focus {
    background: transparent;
    color: #222222;
    outline: none;
}

.pda-trigger-btn .pda-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* --- Modal overlay --- */
.pda-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.pda-modal-overlay.pda-open {
    display: flex;
}

.pda-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

/* --- Modal dialog --- */
.pda-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    margin: 16px;
    animation: pdaSlideIn 0.22s ease-out;
}

@keyframes pdaSlideIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pda-modal-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* --- Hlavička modalu --- */
.pda-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 16px;
    background: #000000;
    color: #fff;
}

.pda-modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pda-modal-header-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pda-modal-header-icon svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
}

.pda-modal-title {
    margin: 0 0 3px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.pda-modal-subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.3;
}

.pda-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
    margin-top: 2px;
}

.pda-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.pda-close svg {
    width: 20px;
    height: 20px;
}

/* --- Tělo modalu --- */
.pda-modal-body {
    padding: 22px 24px 24px;
}

/* --- Výsledková zpráva --- */
.pda-result {
    display: none;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    font-weight: 500;
}

.pda-result.pda-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.pda-result.pda-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- Formulářové skupiny --- */
.pda-form-group {
    margin-bottom: 16px;
}

.pda-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.pda-required {
    color: red;
    margin-left: 2px;
}

.pda-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.pda-input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231,76,60,0.12);
}

.pda-input.pda-input-error {
    border-color: #e74c3c;
}

/* --- Input group s příponou --- */
.pda-input-group {
    display: flex;
    align-items: stretch;
}

.pda-input-group .pda-input {
    border-radius: 6px 0 0 6px;
    flex: 1;
}

.pda-input-addon {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #f4f4f4;
    border: 1.5px solid #ddd;
    border-left: none;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Aktuální cena produktu --- */
.pda-price-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 14px;
    font-size: 0.875rem;
}

.pda-price-label {
    color: #666;
}

.pda-price-value {
    color: #222222;
    font-weight: 700;
    font-size: 1rem;
}

/* --- Nápověda --- */
.pda-hint {
    margin: 5px 0 0;
    font-size: 0.78rem;
    color: #888;
    line-height: 1.4;
}

/* --- Checkbox --- */
.pda-consent-wrap {
    margin-bottom: 14px;
}

.pda-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.pda-checkbox-native {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pda-checkbox-box {
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: border-color 0.15s, background 0.15s;
    color: #fff;
}

.pda-checkbox-box svg {
    width: 10px;
    height: 10px;
    opacity: 0;
    transition: opacity 0.15s;
}

.pda-checkbox-native:checked + .pda-checkbox-box {
    background: #e74c3c;
    border-color: #e74c3c;
}

.pda-checkbox-native:checked + .pda-checkbox-box svg {
    opacity: 1;
}

.pda-checkbox-text {
    font-size: 0.84rem;
    color: #555;
    line-height: 1.5;
}

.pda-link {
    color: #e74c3c;
    text-decoration: underline;
}

.pda-link:hover {
    color: #c0392b;
}

/* --- GDPR --- */
.pda-gdpr {
    margin-bottom: 14px;
    font-size: 0.84rem;
}

/* --- Submit tlačítko --- */
.pda-form-footer {
    margin-top: 6px;
}

.pda-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    background: #4c2b11;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.pda-submit-btn:hover:not(:disabled) {
    opacity: 1;
}

.pda-submit-btn:active:not(:disabled) {
    transform: scale(0.99);
}

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

.pda-btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.pda-spinner {
    display: none;
    animation: pdaSpin 0.7s linear infinite;
}

.pda-spinner svg {
    width: 18px;
    height: 18px;
}

@keyframes pdaSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* --- CMS modal --- */
.pda-cms-overlay .pda-modal-dialog {
    max-width: 560px;
}

.pda-cms-overlay .pda-modal-header {
    background: #2c3e50;
}

.pda-cms-overlay .pda-modal-body {
    max-height: 60vh;
    overflow-y: auto;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #444;
}

/* --- Předvyplněný input (přihlášený zákazník) --- */
.pda-prefilled-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pda-input-prefilled {
    background: #f8f9fa;
    color: #555;
    cursor: default;
    padding-right: 72px;
}

.pda-input-prefilled:focus {
    border-color: #ddd;
    box-shadow: none;
}

.pda-prefilled-badge {
    position: absolute;
    right: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #27ae60;
    background: #eafaf1;
    border: 1px solid #a9dfbf;
    border-radius: 3px;
    padding: 2px 6px;
    white-space: nowrap;
    pointer-events: none;
}

/* --- Přihlášení info zpráva --- */
.pda-logged-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: #eafaf1;
    border: 1px solid #a9dfbf;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #1e8449;
    margin-bottom: 16px;
}

.pda-logged-info svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: #27ae60;
}
@media (max-width: 480px) {
    .pda-modal-dialog {
        margin: 8px;
    }
    .pda-modal-body {
        padding: 18px 16px 20px;
    }
    .pda-modal-header {
        padding: 16px;
    }
}
