/**
 * Instagram Follower Milestone Tracker - CreatorFlow Free Tool
 * Brand Colors: #000000 (black), #d1fe17 (lime green)
 * NO box-shadows, NO gradients
 */

/* Tool Section - Compact for this tool */
.tool-section {
    padding: 1.5rem 0 2.5rem;
}

.tool-section__container {
    max-width: 600px;
}

/* Tool Card - Compact */
.tool-card {
    padding: 1.75rem 2rem;
    max-width: 100%;
}

.tool-card__title {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 1.25rem;
}

/* Tabs - Modern Pill Style */
.tool-tabs {
    display: flex;
    gap: 0.5rem;
    margin: 0 auto 1.5rem;
    max-width: 400px;
    background: #f3f4f6;
    padding: 0.375rem;
    border-radius: 12px;
    border-bottom: none;
}

.tool-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 8px;
    flex: 1;
    border-bottom: none;
    margin-bottom: 0;
}

.tool-tab:hover:not(:disabled) {
    color: #374151;
    background: rgba(255, 255, 255, 0.5);
}

.tool-tab--active {
    color: #000000;
    background: #ffffff;
    border-bottom: none;
}

.tool-tab__number {
    width: 24px;
    height: 24px;
    font-size: 0.8125rem;
    background: #e5e7eb;
}

.tool-tab--active .tool-tab__number {
    background: #d1fe17;
    color: #000000;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 0;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.375rem;
}

.form-input {
    padding: 0.75rem 0.875rem;
    font-size: 0.9375rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding-left: 0.875rem;
}

.form-input:hover {
    border-color: #d1d5db;
}

.form-input:focus {
    outline: none;
    border-color: #000000;
}

.form-hint {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* History Section */
.history-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.history-title {
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
}

.history-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.history-table th,
.history-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.history-table th {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.history-table td {
    color: #374151;
}

.history-table tbody tr:hover {
    background: #f9fafb;
}

.history-change {
    font-weight: 600;
}

.history-change--positive {
    color: #10b981;
}

.history-change--negative {
    color: #ef4444;
}

.history-change--neutral {
    color: #6b7280;
}

.history-note {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #6b7280;
    font-size: 0.8125rem;
}

.history-delete-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.history-delete-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

.history-delete-btn svg {
    width: 16px;
    height: 16px;
}

.history-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
    font-size: 0.9375rem;
}

/* Tool Actions */
.tool-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn--danger {
    background: transparent;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.btn--danger:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

.btn--outline {
    background: transparent;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.btn--outline:hover {
    border-color: #d1fe17;
    background: #f9fafb;
}

/* Chart Section */
.chart-section {
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container canvas {
    max-width: 100%;
}

.chart-empty {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
    font-size: 0.9375rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border: 2px dashed #e5e7eb;
}

.chart-empty.show {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.stat-card {
    background: #f9fafb;
    padding: 1.25rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.stat-card__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d1fe17;
}

.stat-card__icon svg {
    width: 20px;
    height: 20px;
    color: #000000;
}

.stat-card__content {
    flex: 1;
    min-width: 0;
}

.stat-card__value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.2;
}

.stat-card__label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

/* Milestones Section */
.milestones-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.milestones-title {
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
    text-align: center;
}

.milestones-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.milestone-card {
    background: #f9fafb;
    padding: 1rem 0.75rem;
    border-radius: 0.75rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.milestone-card--reached {
    background: #f0fdf4;
    border-color: #10b981;
}

.milestone-card__emoji {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    filter: grayscale(1);
    opacity: 0.5;
}

.milestone-card--reached .milestone-card__emoji {
    filter: none;
    opacity: 1;
}

.milestone-card__count {
    font-size: 0.875rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.milestone-card--reached .milestone-card__count {
    color: #000000;
}

.milestone-card__label {
    font-size: 0.6875rem;
    color: #9ca3af;
    line-height: 1.3;
}

.milestone-card--reached .milestone-card__label {
    color: #10b981;
    font-weight: 600;
}

.milestone-card__status {
    font-size: 0.625rem;
    margin-top: 0.375rem;
    color: #9ca3af;
}

.milestone-card--reached .milestone-card__status {
    color: #10b981;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .tool-section {
        padding: 1rem 0 2rem;
    }

    .tool-card {
        padding: 1.25rem 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .tool-tabs {
        max-width: 100%;
    }

    .tool-tab {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .tool-tab__number {
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }

    .history-table {
        font-size: 0.8125rem;
    }

    .history-table th,
    .history-table td {
        padding: 0.625rem 0.375rem;
    }

    .history-note {
        max-width: 80px;
    }

    .tool-actions {
        flex-direction: column;
    }

    .tool-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .chart-container {
        height: 250px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .stat-card__icon {
        width: 40px;
        height: 40px;
    }

    .stat-card__icon svg {
        width: 18px;
        height: 18px;
    }

    .stat-card__value {
        font-size: 1.125rem;
    }

    .milestones-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }

    .milestone-card {
        padding: 0.75rem 0.5rem;
    }

    .milestone-card__emoji {
        font-size: 1.25rem;
    }

    .milestone-card__count {
        font-size: 0.75rem;
    }

    .milestone-card__label {
        font-size: 0.5625rem;
    }

    .milestone-card__status {
        display: none;
    }
}

/* iPhone 14 and smaller */
@media (max-width: 430px) {
    .tool-section {
        padding: 0.75rem 0 1.5rem;
    }

    .tool-section__container {
        padding: 0 1rem;
    }

    .tool-card {
        padding: 1rem;
    }

    .form-label {
        font-size: 0.75rem;
    }

    .form-input {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }

    .form-hint {
        font-size: 0.75rem;
    }

    .tool-tabs {
        padding: 0.25rem;
        border-radius: 10px;
    }

    .tool-tab {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    .tool-tab__number {
        width: 18px;
        height: 18px;
        font-size: 0.6875rem;
    }

    .history-section {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }

    .history-title {
        font-size: 0.9375rem;
    }

    .history-table th,
    .history-table td {
        padding: 0.5rem 0.25rem;
    }

    .history-table th {
        font-size: 0.625rem;
    }

    .history-table td {
        font-size: 0.75rem;
    }

    .chart-container {
        height: 220px;
    }

    .stats-grid {
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.875rem 0.5rem;
    }

    .stat-card__icon {
        width: 36px;
        height: 36px;
    }

    .stat-card__icon svg {
        width: 16px;
        height: 16px;
    }

    .stat-card__value {
        font-size: 1rem;
    }

    .stat-card__label {
        font-size: 0.6875rem;
    }

    .milestones-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.375rem;
    }

    .milestone-card {
        padding: 0.625rem 0.25rem;
        border-radius: 0.5rem;
    }

    .milestone-card__emoji {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .milestone-card__count {
        font-size: 0.625rem;
    }

    .milestone-card__label {
        font-size: 0.5rem;
    }
}

/* Extra small mobile */
@media (max-width: 360px) {
    .tool-section__container {
        padding: 0 0.875rem;
    }

    .milestones-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .milestone-card {
        padding: 0.75rem 0.5rem;
    }

    .milestone-card__emoji {
        font-size: 1.25rem;
    }

    .milestone-card__count {
        font-size: 0.75rem;
    }

    .milestone-card__label {
        font-size: 0.625rem;
    }

    .milestone-card__status {
        display: block;
        font-size: 0.5625rem;
    }
}
