/* Pricing Calculator Widget Styles */
:root {
    --pw-primary: #22C55E;
    --pw-bg: #111827;
    --pw-card: #1F2937;
    --pw-border: #374151;
    --pw-text: #F9FAFB;
    --pw-text-muted: #9CA3AF;
    --pw-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

/* Base theme support */
html[data-theme="light"] {
    --pw-bg: #FFFFFF;
    --pw-card: #F9FAFB;
    --pw-border: #E5E7EB;
    --pw-text: #111827;
    --pw-text-muted: #6B7280;
}

#pricing-widget-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    font-family: 'Inter', sans-serif;
}

/* Floating Button */
.pw-launcher {
    width: 60px;
    height: 60px;
    background: var(--pw-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--pw-shadow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
    font-size: 24px;
}

.pw-launcher:hover {
    transform: scale(1.1) rotate(5deg);
}

.pw-launcher.active {
    transform: rotate(90deg) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

/* Popup Panel */
.pw-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    max-width: 90vw;
    background: var(--pw-bg);
    border: 1px solid var(--pw-border);
    border-radius: 20px;
    box-shadow: var(--pw-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.pw-panel.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

/* Header */
.pw-header {
    padding: 20px;
    background: var(--pw-primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pw-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.pw-close {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    font-size: 1.2rem;
}

.pw-close:hover { opacity: 1; }

/* Body */
.pw-body {
    padding: 24px;
    max-height: 480px;
    overflow-y: auto;
}

/* Search Box */
.pw-search-container {
    position: relative;
    margin-bottom: 20px;
}

.pw-search-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    background: var(--pw-card);
    border: 1px solid var(--pw-border);
    border-radius: 12px;
    color: var(--pw-text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.pw-search-input:focus {
    border-color: var(--pw-primary);
}

.pw-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pw-text-muted);
    font-size: 14px;
}

/* Results Area */
.pw-results {
    display: none; /* Shown after selection */
}

.pw-country-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--pw-border);
}

.pw-flag { font-size: 1.8rem; }
.pw-country-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--pw-text);
}

/* Service Card */
.pw-service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pw-card {
    background: var(--pw-card);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--pw-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pw-card-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.pw-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pw-text-muted);
}

.pw-card-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pw-text);
}

.pw-card-base {
    font-size: 0.7rem;
    color: var(--pw-text-muted);
}

.pw-math {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    border-top: 1px solid var(--pw-border);
    margin-top: 10px;
}

.pw-math-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--pw-text-muted);
}

.pw-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pw-text);
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px dashed var(--pw-border);
}

.pw-card-label {
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.pw-unavailable {
    color: var(--pw-text-muted);
    font-size: 0.85rem;
    font-style: italic;
    font-weight: 500;
}

/* Footer Section */
.pw-footer {
    padding: 20px;
    border-top: 1px solid var(--pw-border);
    background: var(--pw-card);
}

.pw-btn-contact {
    width: 100%;
    padding: 12px;
    background: var(--pw-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: block;
    text-decoration: none;
}

.pw-btn-contact:hover {
    background: #16A34A;
    transform: translateY(-1px);
}

/* Loading Overlay */
.pw-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(2px);
    z-index: 5;
    align-items: center;
    justify-content: center;
    color: white;
}

.pw-panel.loading .pw-loading { display: flex; }

/* Custom Scrollbar */
.pw-body::-webkit-scrollbar { width: 4px; }
.pw-body::-webkit-scrollbar-track { background: transparent; }
.pw-body::-webkit-scrollbar-thumb { background: var(--pw-border); border-radius: 10px; }

/* Country Search List */
.pw-country-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pw-bg);
    border: 1px solid var(--pw-border);
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.pw-country-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.pw-country-item:hover {
    background: var(--pw-card);
}
