/* ========================================
   Price Compare Plugin - Modal Styles
   ======================================== */

/* Trigger Button - Fixed on right side */
.pcp-trigger {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #1a3c5e;
    color: #fff;
    padding: 14px 18px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: -2px 2px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 18px 12px;
}

.pcp-trigger:hover {
    right: 0;
    padding-right: 20px;
    background: #c8a96e;
}

.pcp-trigger svg {
    transform: rotate(90deg);
}

/* Modal Overlay */
.pcp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pcp-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Modal Container */
.pcp-modal-container {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: pcpSlideUp 0.3s ease;
}

@keyframes pcpSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.pcp-modal-header {
    padding: 24px 28px 16px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.pcp-modal-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #1a3c5e;
}

.pcp-modal-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.pcp-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s;
}

.pcp-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Modal Body */
.pcp-modal-body {
    padding: 20px 28px 28px;
}

/* Room Selector */
.pcp-room-selector {
    margin-bottom: 20px;
}

.pcp-room-selector label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pcp-room-selector select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #fafafa;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.pcp-room-selector select:focus {
    outline: none;
    border-color: #c8a96e;
    background-color: #fff;
}

/* Loading Spinner */
.pcp-loading {
    text-align: center;
    padding: 40px 0;
}

.pcp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #c8a96e;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: pcpSpin 0.8s linear infinite;
}

@keyframes pcpSpin {
    to { transform: rotate(360deg); }
}

.pcp-loading p {
    color: #888;
    font-size: 14px;
    margin: 0;
}

/* Room Info */
.pcp-room-info {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.pcp-room-image {
    width: 100px;
    height: 75px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.pcp-room-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcp-room-details h3 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #1a3c5e;
}

.pcp-per-night {
    margin: 0;
    color: #888;
    font-size: 13px;
}

/* Direct Price - Best Price Section */
.pcp-direct-price {
    position: relative;
    background: linear-gradient(135deg, #f0f7ed 0%, #e8f5e2 100%);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.pcp-best-badge {
    position: absolute;
    top: -10px;
    left: 18px;
    background: #4caf50;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

/* Price Row */
.pcp-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pcp-provider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pcp-provider-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pcp-logo-direct {
    background: #1a3c5e;
    color: #c8a96e;
}

.pcp-provider-name strong {
    display: block;
    font-size: 15px;
    color: #1a3c5e;
}

.pcp-save-tag {
    display: inline-block;
    font-size: 11px;
    color: #4caf50;
    font-weight: 600;
}

.pcp-price {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pcp-price-amount {
    font-size: 22px;
    font-weight: 800;
    color: #1a3c5e;
}

.pcp-book-btn {
    background: #c8a96e;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s;
    white-space: nowrap;
}

.pcp-book-btn:hover {
    background: #b89555;
}

/* OTA Prices List */
.pcp-ota-prices h4 {
    margin: 0 0 12px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    font-weight: 600;
}

.pcp-ota-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pcp-ota-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pcp-ota-row:last-child {
    border-bottom: none;
}

.pcp-ota-provider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pcp-ota-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.pcp-ota-logo.booking { background: #003580; }
.pcp-ota-logo.airbnb { background: #FF5A5F; }
.pcp-ota-logo.expedia { background: #00355F; }
.pcp-ota-logo.agoda { background: #5392f9; }

.pcp-ota-name {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.pcp-ota-price-wrap {
    text-align: right;
}

.pcp-ota-price {
    font-size: 18px;
    font-weight: 700;
    color: #999;
    text-decoration: line-through;
}

.pcp-ota-diff {
    font-size: 11px;
    color: #e53935;
    font-weight: 600;
}

/* Savings Summary */
.pcp-savings {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    text-align: center;
}

.pcp-savings p {
    margin: 0;
    font-size: 14px;
    color: #5d4037;
}

.pcp-savings strong {
    color: #4caf50;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .pcp-modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .pcp-modal-body {
        padding: 16px 18px 22px;
    }

    .pcp-modal-header {
        padding: 18px 18px 12px;
    }

    .pcp-price-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .pcp-price {
        width: 100%;
        justify-content: space-between;
    }

    .pcp-room-info {
        flex-direction: column;
    }

    .pcp-room-image {
        width: 100%;
        height: 140px;
    }

    .pcp-trigger {
        top: auto;
        bottom: 20px;
        right: 20px;
        writing-mode: horizontal-tb;
        border-radius: 50px;
        padding: 12px 18px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    }

    .pcp-trigger svg {
        transform: none;
    }
}
