:root {
    --compare-blue: #007bff;
    --compare-light-gray: #f8f9fa;
    --compare-dark-gray: #343a40;
}

.hidden {
    display: none !important;
}

.compare-search-form {
    margin-bottom: 30px;
    padding: 20px;
    display: flex;
    justify-content: normal;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 1px;
    background-color: #fff;
}

.selected-heading {
    font-weight: 600;
    color: #141517;
}

.compare-message {
    text-align: center;
}

.search-field-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: space-between;
    align-items: stretch;
}

.search-field-container:has(.compare-placeholder-btn) {
    align-items: flex-start; 
}

.search-input-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative; 
}

.search-input-wrapper label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--compare-dark-gray);
}

.search-input-wrapper input[type="text"] {
    width: 99%;
    padding: 6px 7px;
    border: 1px solid #ccc;
    border-radius: 0px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 500;
    font-family: arimo;
    transition: border-color 0.3s;
}

.search-input-wrapper input[type="text"]:focus {
    border-color: var(--compare-blue);
    outline: none;
}

.search-loading {
    position: absolute;
    top: 70px;
    right: 10px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.mobile-name-display {
    text-align: center;
    margin-top: 8px;
    color: #000;
    background: #fffbfb;
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 5px; 
}

.mobile-name-display .mobile-name-text {
    font-weight: 700;
    font-size: 16px;
    font-family: Abel;
}

.mobile-thumb {
    width: 160px;
    object-fit: contain;
    margin-bottom: 5px;
    border-radius: 4px;
}

.specs-button {
    order: 3;
    margin: 5px auto;
    width: 100%;
    padding: 6px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    font-family: Arimo;
    font-size: 14px;
    font-weight: 400;
    border-radius: 0px;
    background: #d50000;
}

.specs-button:hover {
    background-color: #540606;
    color: #fffcf5;
}

.compare-submit-btn {
    display: none !important; 
}

.compare-placeholder-btn {
    display: inline-block !important;
    padding: 10px 20px;
    background-color: #d50000;
    color: #fff;
    border: none;
    border-radius: 1px;
    cursor: not-allowed;
    font-size: 1rem;
    font-weight: 600;
    min-width: 150px; 
    align-self: flex-end; 
}

.search-results-dropdown {
    position: absolute;
    top: 70px; 
    left: 0;
    right: 0;
    z-index: 1000;
    border: 1px solid #ddd;
    border-top: none;
    background: white;
    max-height: 450px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    color: #212121;
    font-family: Arimo;
    font-weight: 500;

    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-item:hover,
.search-result-item:focus {
    background-color: #f0f0f0;
    color: var(--compare-blue);
    outline: 2px solid var(--compare-blue);
    outline-offset: -2px;
}

.mobile-thumb-dropdown {
    width: 50px; 
    height: 60px !important;
    object-fit: contain;
}

/* AdSense Ad Wrapper Styling */
.comparison-ad-wrapper {
    width: 100%;
    margin: 20px 0;
    padding: 10px 0;
    text-align: center;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.comparison-table.specs-table {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
    background: #f6f6f6;
    padding: 0px 5px 10px 5px;
    margin-top: 20px;
    border-radius:0;
    border: none;
}

.compare-message.compare-single-mobile {
    text-align: center;
    padding: 20px;
    background: var(--compare-light-gray);
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 20px;
}

.compare-section-header.spec-section-group {
    border-top: 6px solid #eaeaea;
    border-bottom: none;
    padding-bottom: 0px;
    margin-bottom: 8px;
    background: transparent;
    padding: 0;
    color: #000;
}

.main-heading { 
    font-family: Roboto, sans-serif; 
    font-size: 14px; 
    font-weight: 700; 
    color: #000; 
    background: #f6f6f6; 
    padding: 5px; 
    margin: 0px;
    text-align: left;
    grid-column: 1 / span 3;
}

.compare-section-header {
    display: block; 
    border: none;
}

.compare-row.spec-row {
    background-color: transparent;
    border: 1px solid #ddd;
    padding: 0px 3px;
    line-height: 18px;
    align-items: baseline;
}

.compare-row:nth-child(even) {
    background-color: transparent;
}

.compare-label.spec-label {
    width: 60px;
    font-family: Roboto, sans-serif;
    font-size: 14px; 
    font-weight: 600; 
    color: #555; 
    padding: 5px 10px 5px 0;
    text-align: left;
    background-color: transparent;
}

.compare-value.spec-value {
    font-family: Roboto, sans-serif; 
    font-size: 14px; 
    color: #000;
    width: 100%;
    text-align: start !important;
    padding: 5px 10px;
}

.compare-value.value-1.spec-value {
    border-right: 1px solid #ddd;
}

@media screen and (min-width: 768px) {
    .main-heading { 
        display: block; 
    }
    
    .compare-row {
        display: grid; 
        grid-template-columns: 200px 1fr 1fr; 
    }
    
    .sticky-header {
        display: none !important;
    }
    
    .compare-label.spec-label {
        width: 70px; 
        font-size: 14px; 
        font-weight: 600; 
        color: #555;
        text-align: left;
    }
    
    .compare-section-header .main-heading {
        grid-column: 1 / span 3;
    }
    
    .search-field-container {
        flex-wrap: nowrap; 
        justify-content: space-between;
    }
    
    .compare-search-form {
        margin-bottom: 30px;
        padding: 20px;
        box-shadow: none;
        margin: 5px;
        border: 1px solid #ddd;
        border-radius: 1px;
        background-color: #fff;
    }

    .compare-placeholder-btn {
        align-self: flex-end; 
    }
}

@media screen and (max-width: 768px) {
    .search-field-container {
        width: 50%;
        flex-direction: row;
        gap: 2px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .search-input-wrapper {
        min-width: 100%; 
    }
    
    .mobile-thumb {
        width: 170px;
        height: 170px;
    }
    
    .compare-placeholder-btn {
        flex-grow: 1;
        min-width: 100%; 
    }

    .right-title {
        width: 35%;
        text-align: right;
    }
    
    .left-title {
        width: 35%;
        text-align: left;
    }
    
    .specs-table { 
        background: #ffffff; 
    }
    
    .compare-row {
        display: grid; 
        grid-template-columns: 1fr 1fr; 
        padding: 2px 3px;
    }
    
    .compare-section-header .main-heading { 
        font-size: 14px; 
        padding: 1px 5px 1px 5px;
        background: #ffffff;
        margin: 0px;
        grid-column: 1 / span 2;
    }
    
    .compare-section-header.spec-section-group {
        padding: 0; 
        margin: 0; 
    }
    
    .compare-label.spec-label { 
        grid-column: 1 / span 2; 
        width: auto; 
        font-size: 12px; 
        font-weight: 700; 
        color: #616161;
        width: 70px;
        padding: 5px 3px 2px;
        text-align: left;
    }
    
    .compare-value.spec-value {
        width: 100%; 
        font-size: 12px; 
        color: #212121;
        padding: 2px 5px;
        text-align: start !important;
    }
    
    .compare-value.value-1 {
        padding: 2px 5px;
        border-right: 1px solid #ddd;
        width: 100%;
    }
    
    .compare-value.value-2 {
        border-right: none;
        padding: 2px 5px;
    }

    .mobile-name-display {
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 10px;
        text-align: left;
        gap: 3px;
    }
    
    .mobile-name-display .mobile-name-text {
        font-size: 16px;
        color: #555;
        font-family: Abel;
        font-weight: 600 !important;
        width: 100%; 
        order: 2;
        text-align: center;
    }
    
    .mobile-thumb {
        order: 1;
        margin: 0;
    }
    
    .mobile-name-display {
        position: relative;
    }

    .mobile-name-display .mobile-name-text {
        position: relative;
        background: #fff;
        padding: 8px 15px;
        font-family: 'Abel', sans-serif;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .sticky-header {
        position: fixed;
        top: 0;
        left: 0;
        font-weight: 600;
        width: 100%;
        background: #fff;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 20px;
        z-index: 1000;
    }
    
    .compare-message {
        text-align: center;
        padding: 30px 5px 150px 5px;
    }
    
    .sticky-header {
        border-bottom: 6px #000 solid;
    }
}