/* WC Purchase Modes — Frontend Styles */

/* Price — always visible, unchanged */
.wcpm-price-on-request {
    font-size: 1.2em;
    font-weight: 600;
    color: inherit;
    display: inline-block;
    margin-bottom: 8px;
}

/* ---- Action button group ---- */
.wcpm-action-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

/* Inquire — full width, outlined style */
.wcpm-btn-inquire {
    width: 100%;
    display: block;
    text-align: center;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .8em;
    font-weight: 600;
    padding: 14px 20px !important;
    background: transparent !important;
    color: inherit !important;
    border: 1px solid currentColor !important;
    border-radius: 2px !important;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.wcpm-btn-inquire:hover {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}

/* Call Us + Email Us row */
.wcpm-contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.wcpm-btn-contact {
    display: block;
    text-align: center;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .8em;
    font-weight: 600;
    padding: 12px 10px !important;
    background: transparent !important;
    color: inherit !important;
    border: 1px solid currentColor !important;
    border-radius: 2px !important;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.wcpm-btn-contact:hover {
    background: #111 !important;
    color: #fff !important;
    border-color: #111 !important;
}

/* Loop / archive: don't overflow card */
.wcpm-loop-actions .wcpm-btn-inquire,
.wcpm-loop-actions .wcpm-btn-contact {
    font-size: .72em;
    padding: 10px 8px !important;
}
.wcpm-loop-actions .wcpm-contact-row {
    gap: 6px;
}

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

.wcpm-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
    cursor: pointer;
}

.wcpm-modal-box {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 32px 36px;
    max-width: 520px;
    width: calc(100% - 32px);
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,.22);
    animation: wcpmSlideIn .2s ease-out;
}

@keyframes wcpmSlideIn {
    from { transform: translateY(-18px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.wcpm-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
}
.wcpm-modal-close:hover { color: #000; }

.wcpm-modal-box h3 {
    margin: 0 0 20px;
    font-size: 1.2em;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

/* ---- Built-in form ---- */
.wcpm-builtin-form .wcpm-field {
    margin-bottom: 16px;
}
.wcpm-builtin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: .9em;
}
.wcpm-builtin-form input,
.wcpm-builtin-form textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: .95em;
    box-sizing: border-box;
    transition: border-color .15s;
}
.wcpm-builtin-form input:focus,
.wcpm-builtin-form textarea:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34,113,177,.2);
}
.wcpm-builtin-form textarea { resize: vertical; }

.wcpm-form-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.wcpm-submit-btn {
    min-width: 110px;
}

.wcpm-form-msg {
    font-size: .9em;
    font-weight: 500;
}
.wcpm-form-msg.wcpm-success { color: #00a32a; }
.wcpm-form-msg.wcpm-error   { color: #d63638; }

/* Spinner */
.wcpm-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wcpmSpin .7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes wcpmSpin { to { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 600px) {
    .wcpm-modal-box { padding: 22px 18px; }
}
