/* Capital Gains Calculator Styles — Theme: #FF6725 (orange) */

/* Hero Section */
.cg-search-hero {
    background: linear-gradient(135deg, #ff6725 0%, #ff8f5c 50%, #ffb88c 100%);
    border-radius: 20px 20px 0 0;
    padding: 30px 30px 25px;
    position: relative;
    overflow: hidden;
}
.cg-search-hero-decoration {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    pointer-events: none;
}
.cg-search-hero-decoration::before {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.cg-search-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.cg-search-hero-badge i {
    font-size: 11px;
}
.cg-search-hero-title {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.12);
}
.cg-search-hero-desc {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin-bottom: 0;
}
.cg-search-hero-desc a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cg-search-hero-desc a:hover {
    color: #fff;
    text-decoration-thickness: 2px;
}
.cg-search-hero + .cg-search-card {
    border-radius: 0 0 20px 20px;
    margin-top: -1px;
}

/* Search / Calculator Card */
.cg-search-card {
    position: relative;
}

/* Input Group with Rupee Prefix */
.cg-input-group {
    position: relative;
}
.cg-input-group .cg-rupee-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-weight: 600;
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
}
.cg-input-group input {
    padding-left: 30px !important;
}

/* Results Section */
.cg-results-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}
.cg-results-header {
    background: linear-gradient(135deg, #ff6725 0%, #ff8f5c 100%);
    padding: 20px 25px;
    text-align: center;
}
.cg-results-header h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.cg-results-header p {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    margin: 5px 0 0;
}
.cg-results-body {
    padding: 25px;
}

/* Holding Period Badge */
.cg-holding-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
}
.cg-holding-badge.long-term {
    background: #fff5f0;
    color: #FF6725;
    border: 1px solid #ffd4c2;
}
.cg-holding-badge.short-term {
    background: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}
.cg-holding-badge i {
    font-size: 16px;
}

/* Comparison Table (With Indexation vs Without Indexation) */
.cg-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}
.cg-comparison-table thead th {
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border-bottom: 2px solid #e9ecef;
}
.cg-comparison-table thead th:first-child {
    text-align: left;
    background: #f8f9fa;
    color: #495057;
    width: 40%;
}
.cg-comparison-table thead th.cg-col-old {
    background: #fff5f0;
    color: #FF6725;
}
.cg-comparison-table thead th.cg-col-new {
    background: #eff6ff;
    color: #2563eb;
}
.cg-comparison-table tbody td {
    padding: 12px 18px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    vertical-align: middle;
}
.cg-comparison-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: #495057;
    background: #fafafa;
}
.cg-comparison-table tbody tr:last-child td {
    border-bottom: none;
}
.cg-comparison-table tbody tr:hover {
    background: #fffaf7;
}
.cg-comparison-table .cg-amount {
    font-weight: 700;
    font-size: 15px;
    color: #212529;
}
.cg-comparison-table .cg-amount.gain {
    color: #FF6725;
}
.cg-comparison-table .cg-amount.loss {
    color: #dc3545;
}
.cg-comparison-table .cg-amount.tax {
    color: #dc3545;
    font-size: 16px;
}

/* Winner/Better Option Highlight */
.cg-winner-row td {
    background: #fff5f0 !important;
}
.cg-winner-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #FF6725;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 6px;
}

/* Tax Savings Banner */
.cg-savings-banner {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dd 100%);
    border: 1px solid #ffd4c2;
    border-radius: 12px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.cg-savings-banner .cg-savings-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #FF6725;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.cg-savings-banner .cg-savings-text h4 {
    font-size: 15px;
    font-weight: 700;
    color: #9a3412;
    margin: 0 0 3px;
}
.cg-savings-banner .cg-savings-text p {
    font-size: 13px;
    color: #c45a1e;
    margin: 0;
}

/* STCG Results */
.cg-stcg-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.cg-stcg-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 12px;
}
.cg-stcg-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #fef3c7;
    font-size: 14px;
}
.cg-stcg-row:last-child {
    border-bottom: none;
}
.cg-stcg-row .label {
    color: #78716c;
}
.cg-stcg-row .value {
    font-weight: 600;
    color: #292524;
}
.cg-stcg-row.total {
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid #fde68a;
    border-bottom: none;
}
.cg-stcg-row.total .label {
    font-weight: 700;
    color: #92400e;
}
.cg-stcg-row.total .value {
    font-weight: 800;
    color: #92400e;
    font-size: 16px;
}

/* Exemptions Info Card */
.cg-exemptions-card {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}
.cg-exemptions-card h4 {
    font-size: 15px;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 12px;
}
.cg-exemptions-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.cg-exemptions-card li {
    padding: 8px 0;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #e0f2fe;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.cg-exemptions-card li:last-child {
    border-bottom: none;
}
.cg-exemptions-card li i {
    color: #0284c7;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Breakdown Row (for step-by-step calculation) */
.cg-breakdown-section {
    margin-bottom: 15px;
}
.cg-breakdown-title {
    font-size: 14px;
    font-weight: 700;
    color: #FF6725;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ffe8dd;
}

/* CII Table inside article */
.cg-cii-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    font-size: 14px;
    margin: 20px 0;
}
.cg-cii-table thead th {
    background: #FF6725;
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}
.cg-cii-table thead th:first-child {
    text-align: left;
}
.cg-cii-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}
.cg-cii-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
}
.cg-cii-table tbody tr:nth-child(even) {
    background: #fffaf7;
}
.cg-cii-table tbody tr:hover {
    background: #fff5f0;
}
.cg-cii-table tbody tr:last-child td {
    border-bottom: none;
}

/* FAQ Section */
.cg-faq-section {
    margin-top: 30px;
}
.cg-faq-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}
.cg-faq-question {
    padding: 15px 20px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    transition: background 0.2s;
}
.cg-faq-question:hover {
    background: #fff5f0;
}
.cg-faq-question .faq-icon {
    transition: transform 0.3s;
    font-size: 12px;
    color: #FF6725;
}
.cg-faq-question.open .faq-icon {
    transform: rotate(180deg);
}
.cg-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s, padding 0.3s;
    font-size: 14px;
    color: #495057;
    line-height: 1.6;
}
.cg-faq-answer.open {
    padding: 15px 20px;
    max-height: 600px;
}

/* Article Section */
#tool-article h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
}
#tool-article h5 {
    font-size: 17px;
    font-weight: 600;
    color: #374151;
    margin-top: 25px;
    margin-bottom: 10px;
}
#tool-article p {
    font-size: 15px;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 12px;
}
#tool-article ul, #tool-article ol {
    padding-left: 22px;
    margin-bottom: 15px;
}
#tool-article li {
    font-size: 15px;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 8px;
}
#tool-article a {
    color: #FF6725;
    font-weight: 500;
    text-decoration: none;
}
#tool-article a:hover {
    text-decoration: underline;
}

/* Hidden by default, shown after calculation */
#cg-results-section {
    display: none;
}
#cg-results-section.visible {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .cg-search-hero {
        padding: 22px 20px 18px;
        border-radius: 16px 16px 0 0;
    }
    .cg-search-hero-title {
        font-size: 1.2rem;
    }
    .cg-comparison-table thead th,
    .cg-comparison-table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }
    .cg-comparison-table .cg-amount {
        font-size: 13px;
    }
    .cg-savings-banner {
        flex-direction: column;
        text-align: center;
    }
    .cg-results-body {
        padding: 18px 15px;
    }
    .cg-stcg-row {
        font-size: 13px;
    }
}
@media (max-width: 480px) {
    .cg-comparison-table thead th,
    .cg-comparison-table tbody td {
        padding: 8px 8px;
        font-size: 12px;
    }
    .cg-comparison-table thead th:first-child {
        width: 35%;
    }
}
