/* =========================================
   1. General Styles & Variables
   ========================================= */
:root {
    --primary-color: #00c853;
    --primary-hover: #009624;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --bg-light: #f9f9f9;
}

/* =========================================
   9. Profit Margin Calculator Widget Styles
   ========================================= */
.profit-calculator-widget {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.profit-calc-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.profit-calc-left,
.profit-calc-right {
    flex: 1;
    min-width: 300px;
}

/* Inputs */
.profit-input-group {
    margin-bottom: 25px;
}

.profit-label {
    display: block;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profit-calc-icon {
    color: #00c853;
    font-size: 18px;
    font-weight: bold;
}

.profit-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.profit-input-wrapper .currency-symbol {
    position: absolute;
    left: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    z-index: 2;
}

.profit-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    outline: none;
    transition: border-color 0.3s;
}

.profit-input-wrapper input[type="number"] {
    padding-left: 35px; /* Space for currency symbol if needed */
}

/* Specific padding for minutes input which has no currency symbol inside */
#profit-calc-minutes {
    padding-left: 15px;
}

/* Add padding for price input specifically */
input[id$="-price"] {
    padding-left: 30px !important;
}

.profit-input:focus {
    border-color: #00c853;
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1);
}

.profit-helper {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Cost Info Box */
.profit-cost-info {
    background-color: #e8f5e9;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #c8e6c9;
}

.profit-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 10px;
}

.profit-info-content p {
    margin: 5px 0;
    font-size: 14px;
    color: #1b5e20;
    line-height: 1.5;
}

/* Right Side Card */
.profit-calc-card {
    background: #f5f5f5;
    border-radius: 16px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.profit-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

.profit-summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

/* Main Result */
.profit-main-result {
    text-align: center;
    margin-bottom: 30px;
}

.result-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.result-amount {
    font-size: 56px;
    font-weight: 800;
    margin: 0 0 15px;
    color: #00c853;
    line-height: 1;
}

.profit-calc-badge {
    display: inline-block;
    background-color: #00c853;
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

/* Details Row */
.profit-details-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.profit-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.detail-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 18px;
    font-weight: 700;
    color: #00c853;
}

/* CTA Button */
.profit-cta-wrapper {
    text-align: center;
}

.profit-calc-btn {
    display: inline-block;
    background-color: #00c853;
    color: #fff;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    width: 100%;
    text-align: center;
}

.profit-calc-btn:hover {
    background-color: #009624;
    transform: translateY(-2px);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .profit-calc-container {
        flex-direction: column;
    }
    
    .profit-calc-card {
        padding: 20px;
    }
    
    .result-amount {
        font-size: 42px;
    }
}

.language-plugin-container,
.integrations-container,
.phone-numbers-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
}

.language-sidebar,
.integrations-sidebar,
.phone-numbers-sidebar {
    width: 260px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    padding-right: 20px;
}

.language-content,
.integrations-content,
.phone-numbers-content {
    flex-grow: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .language-plugin-container,
    .integrations-container,
    .phone-numbers-container {
        flex-direction: column;
    }
    
    .language-sidebar,
    .integrations-sidebar,
    .phone-numbers-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
}

/* Pagination */
.language-pagination,
.integrations-pagination,
.phone-numbers-pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.page-numbers {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.page-numbers:hover,
.page-numbers.current {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.dots {
    padding: 8px 12px;
    color: var(--text-light);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: var(--text-light);
}

/* Search Bar */
.search-container,
.search-bar {
    margin-bottom: 20px;
    position: relative;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.language-search-input,
.integration-search-input,
.phone-numbers-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.2s;
    background: #fff;
    box-shadow: none;
}

.language-search-input:focus,
.integration-search-input:focus,
.phone-numbers-search-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 200, 83, 0.1);
}


/* =========================================
   2. Language Widget Styles
   ========================================= */
.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.language-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: flex-start;
    height: 100%;
}

.language-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.language-code {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 16px;
    background: rgba(0, 200, 83, 0.1);
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    align-self: flex-start;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.language-info h4 {
    margin: 0 0 12px;
    font-size: 18px;
    color: var(--text-color);
    font-weight: 600;
}

.language-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.language-info a:hover {
    text-decoration: underline;
}

/* Sidebar Section Card Style */
.sidebar-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.sidebar-section h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: none;
    padding-bottom: 0;
    color: var(--text-color);
}

.sidebar-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Sidebar List Items (Buttons) */
.sidebar-section ul li,
.cat-item,
.popular-item,
.integration-cats li,
.phone-cats li {
    display: block;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-light);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
}

.sidebar-section ul li:last-child,
.cat-item:last-child,
.popular-item:last-child {
    margin-bottom: 0;
}

.sidebar-section ul li:hover,
.cat-item:hover,
.popular-item:hover,
.integration-cats li:hover,
.phone-cats li:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 200, 83, 0.08);
    transform: translateY(-2px);
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 200, 83, 0.1);
}

.sidebar-section ul li.active,
.cat-item.active,
.popular-item.active,
.integration-cats li.active,
.phone-cats li.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 200, 83, 0.25);
}

/* Global Coverage Stats */
.sidebar-section.global-coverage .stat,
.sidebar-section.global-coverage .total-count-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    margin-top: 5px;
}

.sidebar-section.global-coverage .count {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
}


/* Integrations Widget Styles */
.integrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.integration-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s;
}

.integration-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.integration-icon {
    margin-bottom: 15px;
}

.integration-icon img {
    max-width: 48px;
    height: auto;
}

.integration-icon-fallback {
    width: 48px;
    height: 48px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.integration-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.integration-category {
    font-size: 12px;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 12px;
}

.integration-title {
    margin: 0 0 10px;
    font-size: 18px;
}

.integration-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.integration-stats {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.integration-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}


/* =========================================
   4. Phone Numbers Widget Specifics
   ========================================= */
/* Container styles moved to Shared Layout section */

/* Grid Styles */
#phone-numbers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Card Styles */
.phone-number-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.phone-number-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.phone-number-flag img {
    width: 40px;
    height: 28px; /* Rectangular flag */
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.phone-flag-fallback {
    width: 40px;
    height: 28px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-light);
    border-radius: 2px;
}

.phone-number-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.phone-number-details {
    display: flex;
    flex-direction: column;
}

.phone-number-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.phone-number-code {
    font-size: 13px;
    color: var(--text-light);
}

.phone-number-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.phone-number-link:hover {
    text-decoration: underline;
}

/* Responsive Phone Widget */
@media (max-width: 768px) {
    .phone-numbers-container {
        flex-direction: column;
    }
    .phone-numbers-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 20px;
    }
}


/* =========================================
   5. Cost Calculator Widget Styles
   ========================================= */
.cost-calculator-widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-align: center;
    border: 1px solid #eee; /* Optional border */
}

.calc-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

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

.calc-inputs-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.calc-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.calc-input-group label {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.calc-select,
.calc-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.2s;
}

.calc-select:focus,
.calc-input:focus {
    border-color: #00c853;
    outline: none;
}

.calc-results-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.calc-result-box {
    background: #e8f5e9; /* Light green background */
    padding: 15px;
    border-radius: 6px;
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 80px;
}

.result-value {
    color: #00c853;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.result-label {
    color: #555;
    font-size: 12px;
    margin-top: 5px;
}

.calc-operator {
    color: #00c853;
    font-size: 20px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .calc-inputs-row {
        flex-direction: column;
    }
    
    .calc-results-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .calc-operator {
        transform: rotate(90deg); /* Rotate arrows for vertical layout */
    }
}

/* =========================================
   6. Inbound Call Calculator Widget Styles
   ========================================= */
.inbound-calculator-widget {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    text-align: center;
    border: 1px solid #eee; /* Optional border */
}

.inbound-calculator-widget .calc-header {
    margin-bottom: 20px;
}

.inbound-calculator-widget .calc-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.inbound-calculator-widget .calc-icon i {
    font-size: 24px;
}

/* =========================================
   7. Scroll Ticker Widget Styles
   ========================================= */
.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ticker-track {
    display: inline-flex;
    white-space: nowrap;
    animation-name: scroll-ticker;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.ticker-image {
    object-fit: cover;
    margin-right: 10px;
}

.ticker-track.pause-on-hover:hover {
    animation-play-state: paused;
}

@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   8. ROI Calculator Widget Styles
   ========================================= */
.roi-calculator-widget {
    background-color: #111827;
    padding: 40px;
    border-radius: 16px;
    color: #fff;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.roi-calc-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #fff;
}

.roi-input-group {
    margin-bottom: 30px;
}

.roi-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.roi-calc-label {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.roi-input-value {
    font-size: 16px;
    font-weight: 600;
    color: #00c853;
}

/* Range Slider Styling */
.roi-range-input {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.roi-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00b0ff; /* Blue/Cyan as per screenshot */
    border: 4px solid #111827; /* Dark border to separate from track */
    cursor: pointer;
    box-shadow: 0 0 0 2px #fff; /* White ring */
    transition: transform 0.1s;
    margin-top: -9px; /* Center thumb on track */
}

/* Fix for track in webkit */
.roi-range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: #e0e0e0;
    border-radius: 3px;
}

.roi-range-input::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00b0ff;
    border: 4px solid #111827;
    cursor: pointer;
    box-shadow: 0 0 0 2px #fff;
}

.roi-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Results Row */
.roi-results-row {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 30px;
}

.roi-result-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.roi-result-label {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 10px;
}

.roi-result-value {
    font-size: 28px;
    font-weight: 700;
}

.roi-value-green {
    color: #00c853;
}

.roi-value-red {
    color: #ff5252;
}

/* Savings Section */
.roi-savings-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.roi-savings-label {
    display: block;
    font-size: 16px;
    color: #aaa;
    margin-bottom: 10px;
}

.roi-savings-value {
    font-size: 48px;
    font-weight: 800;
    color: #00c853;
}

/* Responsive */
@media (max-width: 600px) {
    .roi-results-row {
        flex-direction: column;
    }
}
