/* public/assets/css/analizza-sito.css */

/* Main container for the search interface */
.search-interface-container {
    position: relative;
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
    transition: all 0.5s ease-in-out;
}
#search-interface {
    background: url(/img/oss.jpg) no-repeat;
    background-size: cover;
    margin: 0 -24px;
    background-position: left bottom;
    border-radius: 10px;
}
#search-interface.results-state {
    background: none;
    margin: 0;
    border-radius: 0;
}


/* Initial centered state */
.search-interface-container.initial-state {
    justify-content: center;
    align-items: center;
}

/* Results state (search box moves to top) */
.search-interface-container.results-state {
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 20px;
}

/* Search box wrapper */
.search-box-wrapper {
    width: 100%;
    max-width: 800px;
    transition: all 0.5s ease-in-out;
    z-index: 10;
    text-align: center;

    background-color: rgba(0,0,0,.8);
    padding: 50px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.3);
    box-shadow: 0 0 25px 10px #000;
}
#search-interface.results-state .search-box-wrapper {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* Initial state specific styles for search box */
.initial-state .search-box-wrapper {
    /*transform: scale(1.1);*/
}

/* Results state specific styles for search box */
.results-state .search-box-wrapper {
    max-width: 100%;
    /*display: flex;*/
    /*justify-content: flex-end;*/
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.results-state .search-box-wrapper .text-center {
    text-align: left !important;
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.results-state .search-box-wrapper h1 {
    font-size: 1.8rem;
    /*margin-bottom: 0 !important;*/
    /*margin-right: 20px;*/
    /*white-space: nowrap;*/
}

.results-state .search-box-wrapper .input-group {
    max-width: 500px;
    flex-shrink: 0;
    margin: 0 auto;
}

/* Dashboard container */
.dashboard-container {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-in-out 0.3s, transform 0.5s ease-in-out 0.3s;
    display: none;
}

.results-state .dashboard-container {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Input styling */
.search-input {
    padding: 15px 20px;
    font-size: 1.1rem;
    border-radius: 30px 0 0 30px !important;
    border: 1px solid #ced4da;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: auto;
}

.search-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 0 30px 30px 0 !important;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    height: auto;
}

#countryDropdownBtn {
    padding: 15px 20px;
    border: 1px solid #ced4da;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    height: auto;
}

/* Results state - compact version */
.results-state .search-input {
    padding: 8px 15px;
    font-size: 0.95rem;
    box-shadow: none;
    height: 38px;
}

.results-state .search-btn {
    padding: 8px 20px;
    font-size: 0.95rem;
    box-shadow: none;
    height: 38px;
}
.results-state .search-box-wrapper .input-group #countryDropdownBtn {
    padding: 0 15px;
    height: 38px;
}

/* Ensure input group maintains height */
.input-group {
    align-items: stretch;
}

.input-group>* {
    flex-shrink: 0;
}

/* Niche Box Styles */
.niche-box {
    /*background: #fff;*/
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 100%;
    /*border: 1px solid rgba(255,255,255,.15);*/
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.niche-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.niche-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}

.niche-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.niche-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.niche-percentage-badge {
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 15px;
    background-color: rgba(55,125,255,.1) !important;
    color: #377dff !important;
    font-weight: 600;
    cursor: help;
}

.niche-position-badge {
    font-size: 0.9rem;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: help;
}

.niche-position-badge.pos-green {
    background-color: rgba(136,191,87,.175) !important;
    color: #17c653 !important;
}

.niche-position-badge.pos-yellow {
    background-color: rgba(255, 255, 0, .175);
    color: #ff0;
}

.niche-position-badge.pos-orange {
    background-color: rgba(255,193,7,.175) !important;
    color: #ec6a3c !important;
}

.niche-position-badge.pos-gray {
    background-color: rgba(239,242,246,.175) !important;
    color: #eff2f6 !important;
}

.niche-kpi-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.kpi-item {
    text-align: center;
    padding: 15px;
    /*background: #f8f9fa;*/
    border-radius: 8px;
}

.kpi-label {
    font-size: 0.75rem;
    /*color: #6c757d;*/
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.tza-container {
    margin-top: 5px;
}

.tza-label {
    display: flex;
    justify-content: space-between;
    overflow: hidden;
    color: #acb5bd;
    gap: 5px;
}

.progress-bar-custom {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
}

/* Summary Area Styles */
.summary-container {
    /*background: #fff;*/
    /*border-radius: 10px;*/
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /*border: 1px solid #f0f0f0;*/
    margin-bottom: 30px;
}

.summary-screenshot-wrapper {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    position: relative;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-screenshot-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.summary-screenshot-wrapper:hover img {
    transform: scale(1.02);
}

.summary-chart-wrapper {
    width: 100%;
    height: 300px;
}
.summary-chart-wrapper .apexcharts-gridline {
    stroke: rgba(255,255,255,.15) !important;
}
.summary-chart-wrapper .apexcharts-bar-area {
    stroke-linecap: square !important;
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

@media screen and (max-width: 470px) {
    .search-box-wrapper .input-group {
        display: block;
        padding: 0 10px;
    }
    .search-box-wrapper .input-group #domain-input {
        width: 100%;
        border-radius: 10px !important;
        border: none;
        font-size: .9rem;
        margin-bottom: 15px;
    }
    .search-box-wrapper .input-group #countryDropdownBtn {
        display: inline-block;
        border-radius: 50px 0 0 50px;
        padding: 8px 20px;
    }
    .search-box-wrapper .input-group #analyze-btn {
        margin-left: -4px;
    }
}

