/* Modal Styling */
.sdg-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.sdg-modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    margin: 2rem auto;
    background: white;
    border-radius: 12px;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.sdg-modal.show .modal-content {
    transform: translateY(0);
}

.modal-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-branding img {
    height: 40px;
    width: auto;
}

.modal-branding-text {
    display: flex;
    flex-direction: column;
}

.sanskrit {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid var(--goal-color, #333);
    background: #fff;
    color: var(--goal-color, #333);
}

.goal-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.goal-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    padding: 0.5rem;
}

.goal-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.goal-number {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.95;
    display: block;
    margin-bottom: 0.3rem;
}

.goal-title-info h2 {
    margin: 0;
    font-size: 1.8rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
}

.modal-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--goal-color, #333);
    background: transparent;
    color: var(--goal-color, #333);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-btn:hover {
    background: var(--goal-color, #333);
    color: white;
    transform: scale(1.1);
}

.modal-btn svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 2rem;
}

.goal-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--goal-color, #333);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.goal-overview {
    margin-bottom: 2rem;
}

.goal-overview h3,
.goal-targets h3,
.goal-resources h3 {
    color: var(--goal-color, #333);
    margin-bottom: 1rem;
}

.goal-description {
    line-height: 1.6;
    color: #444;
}

.targets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.target-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.target-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.target-number {
    font-weight: 600;
    color: var(--goal-color, #333);
}

.target-description {
    color: #444;
    margin-bottom: 1rem;
}

.indicators-list {
    background: white;
    border-radius: 6px;
    overflow: hidden;
}

.indicators-header {
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.indicators-header span {
    font-weight: 500;
    color: #555;
}

.toggle-indicators {
    background: none;
    border: none;
    padding: 0;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.toggle-indicators.expanded {
    transform: rotate(180deg);
}

.toggle-indicators svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.indicators-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.indicators-list.expanded .indicators-content {
    max-height: 500px;
}

.indicator-item {
    padding: 0.8rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
    color: #555;
    display: flex;
    gap: 0.5rem;
}

.indicator-bullet {
    color: var(--goal-color, #333);
}

.goal-resources {
    margin-top: 2rem;
}

.resources-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    background: #f8f9fa;
    border-radius: 6px;
    color: var(--goal-color, #333);
    text-decoration: none;
    transition: all 0.2s ease;
}

.resource-link:hover {
    background: var(--goal-color, #333);
    color: white;
    transform: translateY(-2px);
}

.resource-link svg {
    width: 20px;
    height: 20px;
}

/* Animation keyframes */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Copy tooltip */
.copy-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }

    .goal-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .goal-icon {
        width: 60px;
        height: 60px;
    }

    .goal-title-info h2 {
        font-size: 1.5rem;
    }

    .goal-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-item {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .resource-link {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 0.5rem auto;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .goal-title-info h2 {
        font-size: 1.3rem;
    }
}
