/**
 * Bra Size Calculator - Frontend Styles
 *
 * @package Bra_Size_Calculator
 */

/* =========================
   Main Calculator
========================= */

.bscp-bra-calculator {
    max-width: 500px;
    margin: auto;
    padding: 25px;
    border: 1px solid #eee;
    border-radius: 10px;
    text-align: center;
    font-family: sans-serif;
    background: #fff;
}

.bscp-bra-calculator h2 {
    margin-bottom: 5px;
}

.bra-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* =========================
   Country Switcher
========================= */

.bscp-country-switcher {
    margin-bottom: 20px;
    text-align: left;
}

.bscp-country-switcher label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.bscp-country-switcher select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    appearance: auto;
}

.bscp-country-switcher select:focus {
    border-color: #2db4c8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(45, 180, 200, 0.2);
}

/* =========================
   Unit Toggle
========================= */

.bscp-unit-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.bscp-unit-toggle button {
    padding: 6px 18px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.bscp-unit-toggle button:hover {
    background: #f5f5f5;
}

.bscp-unit-toggle button.active {
    background: #2db4c8;
    color: #fff;
    border-color: #2db4c8;
}

/* =========================
   Fields
========================= */

.bscp-fields {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 20px;
}

.bscp-field {
    width: 100%;
    text-align: left;
}

.bscp-field label {
    font-size: 14px;
    font-weight: 600;
}

.bscp-field input {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.bscp-field small {
    display: block;
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

/* =========================
   Button
========================= */

.bscp-bra-calc-btn {
    padding: 10px 30px;
    background: #2db4c8;
    border: none;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s ease;
}

.bscp-bra-calc-btn:hover {
    background: #249fb1;
}

/* =========================
   Result Modal
========================= */

.bscp-result-modal-content {
    position: relative;
}

.bscp-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    margin: 0;
    border-radius: 4px;
}

.bscp-modal-close:hover {
    opacity: 0.7;
}

.bscp-result-size {
    font-size: 36px;
    font-weight: bold;
    margin: 15px 0;
}

.bscp-modal-ok-btn {
    margin-top: 15px;
    padding: 8px 22px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.bscp-conversions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    text-align: left;
}

.bscp-conversions h4 {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.bscp-conversion-item {
    display: inline-block;
    padding: 4px 10px;
    margin: 3px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

/* =========================
   Modal
========================= */

.bscp-bra-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.bscp-bra-modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: bscpScaleIn 0.25s ease;
}

.bscp-bra-modal-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.bscp-bra-modal-content p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.bscp-bra-modal-content button {
    margin-top: 15px;
    padding: 8px 22px;
    border: none;
    background: #2db4c8;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.bscp-bra-modal-content button:hover {
    background: #249fb1;
}

/* =========================
   Modal Animation
========================= */

@keyframes bscpScaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================
   Responsive
========================= */

@media (max-width: 480px) {
    .bscp-fields {
        flex-direction: column;
    }
}

/* =========================
   Pro Upgrade Modal
========================= */

.bscp-upgrade-modal-content {
    padding: 30px 25px 20px;
}

.bscp-upgrade-icon {
    font-size: 40px;
    margin-bottom: 8px;
    line-height: 1;
}

.bscp-upgrade-modal-content h3 {
    font-size: 22px;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.bscp-upgrade-desc {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
    margin-bottom: 0;
}

.bscp-upgrade-btn {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 28px;
    background: linear-gradient(135deg, #f5a623, #e8920e);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 3px 10px rgba(245, 166, 35, 0.4);
}

.bscp-upgrade-btn:hover {
    opacity: 0.88;
    color: #fff !important;
}

.bscp-modal-cancel-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: color 0.2s ease;
}

.bscp-modal-cancel-btn:hover {
    color: #555;
    background: transparent;
}

/* PRO items in admin custom dropdown — muted style */

/* =========================
   Custom Country Dropdown
========================= */

.bscp-custom-select-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    /* overflow must be visible so the tooltip can extend below the panel */
    overflow: visible;
}

/* Trigger (the visible "select" button) */
.bscp-custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    user-select: none;
    transition: border-color 0.2s ease;
}

.bscp-custom-select-trigger:hover,
.bscp-cst-open {
    border-color: #2db4c8;
    box-shadow: 0 0 0 2px rgba(45, 180, 200, 0.18);
}

.bscp-cst-arrow {
    font-size: 11px;
    color: #999;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 8px;
}

.bscp-cst-open .bscp-cst-arrow {
    transform: rotate(180deg);
}

/* Dropdown panel */
.bscp-custom-select-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    z-index: 9998;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px 0;
}

.bscp-custom-select-panel.bscp-csp-open {
    display: block;
    animation: bscpFadeDown 0.15s ease;
}

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

/* Group heading */
.bscp-cso-group {
    padding: 6px 14px 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #aaa;
    pointer-events: none;
}

/* Each option row */
.bscp-cso-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s ease;
    gap: 8px;
}

.bscp-cso-item:hover {
    background: #f0f9fb;
}

.bscp-cso-item.bscp-cso-active {
    background: #e6f7fa;
    color: #1a9daf;
    font-weight: 600;
}

/* Pro item — slightly muted */
.bscp-cso-item.bscp-cso-pro {
    color: #555;
}

.bscp-cso-item.bscp-cso-pro:hover {
    background: #fdf8f0;
}

.bscp-cso-text {
    flex: 1;
}

/* PRO badge */
.bscp-pro-badge {
    display: inline-block;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    background: linear-gradient(135deg, #f5a623, #e07b10);
    border-radius: 4px;
    line-height: 1.5;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* PRO badge inside the trigger label */
.bscp-cst-label .bscp-pro-badge {
    margin-left: 6px;
    vertical-align: middle;
}

/* Scrollbar styling */
.bscp-custom-select-panel::-webkit-scrollbar {
    width: 5px;
}

.bscp-custom-select-panel::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.bscp-custom-select-panel::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

/* =========================
   Pro Teaser in Result Modal
========================= */

.bscp-pro-teaser {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #fffbf0, #fff4e0);
    border: 1px solid #f5d98a;
    border-radius: 8px;
    font-size: 13px;
    color: #7a5800;
}

.bscp-pro-teaser-lock {
    font-size: 15px;
    flex-shrink: 0;
}

.bscp-pro-teaser-text {
    flex: 1;
    font-weight: 500;
}

.bscp-pro-teaser-btn {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #f5a623, #e07b10);
    color: #fff !important;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.bscp-pro-teaser-btn:hover {
    opacity: 0.85;
}
