/* DIGIPIN Tool Styles - Orange Theme */
:root {
    --digipin-primary: #ff6725;
    --digipin-primary-dark: #e64500;
    --digipin-primary-light: #ff8a50;
    --digipin-secondary: #ff8a50;
    --digipin-accent: #ff6725;
    --digipin-dark: #2C3E50;
    --digipin-gray: #6c757d;
    --digipin-light-gray: #f8f9fa;
    --digipin-glass: rgba(255, 255, 255, 0.1);
    --digipin-glass-border: rgba(255, 255, 255, 0.2);
}

/* Animated Background */
.digipin-hero {
    background: linear-gradient(135deg, #ff6725 0%, #ff8a50 100%);
    border-radius: 24px;
    padding: 60px 40px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(255, 103, 37, 0.2);
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    animation: float 20s infinite ease-in-out;
}

.shape1 {
    width: 200px;
    height: 200px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape2 {
    width: 150px;
    height: 150px;
    bottom: -75px;
    right: -75px;
    animation-delay: 5s;
}

.shape3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 70%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg) scale(0.9);
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.hero-logo {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    background: var(--digipin-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--digipin-glass-border);
    padding: 20px 40px;
    border-radius: 100px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo i {
    font-size: 3rem;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.2);
    }
}

.hero-logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    color: white;
}

.hero-tagline {
    font-size: 1.3rem;
    margin-bottom: 15px;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.hero-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: bounceIn 1s ease-out;
    animation-fill-mode: both;
}

.badge-item:nth-child(1) { animation-delay: 0.1s; }
.badge-item:nth-child(2) { animation-delay: 0.2s; }
.badge-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.badge-item i {
    font-size: 1rem;
}

/* Main Tool Card */
.digipin-tool-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab Navigation */
.digipin-tabs {
    display: flex;
    background: #f8f9fa;
    padding: 8px;
    gap: 8px;
}

.digipin-tab {
    flex: 1;
    padding: 15px 25px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.digipin-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--digipin-primary);
    transition: width 0.3s ease;
    z-index: -1;
}

.digipin-tab.active {
    background: var(--digipin-primary);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 103, 37, 0.3);
    transform: translateY(-2px);
}

.digipin-tab:hover:not(.active) {
    color: var(--digipin-dark);
    background: rgba(255, 103, 37, 0.05);
}

.digipin-tab i {
    margin-right: 8px;
}

/* Tab Content */
.digipin-tab-content {
    padding: 40px;
    display: none;
    animation: tabFadeIn 0.5s ease;
}

.digipin-tab-content.active {
    display: block;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Map Container */
.digipin-map-wrapper {
    position: relative;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    background: #f0f0f0;
}

#digipinMap {
    height: 100%;
    width: 100%;
    z-index: 1;
}

/* Map Controls Overlay */
.map-controls-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.digipin-search-box {
    flex: 1;
    min-width: 300px;
    padding: 18px 25px;
    background: white;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.digipin-search-box:focus {
    outline: none;
    border-color: var(--digipin-accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(255, 103, 37, 0.2);
}

.digipin-location-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: white;
    color: var(--digipin-accent);
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.digipin-location-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 103, 37, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.digipin-location-btn:hover::before {
    width: 100px;
    height: 100px;
}

.digipin-location-btn:hover {
    transform: scale(1.1);
    color: white;
    background: var(--digipin-accent);
}

.digipin-location-btn.active {
    animation: locatingPulse 1.5s infinite;
    background: var(--digipin-accent);
    color: white;
}

@keyframes locatingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 103, 37, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 103, 37, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 103, 37, 0);
    }
}

/* Coordinate Input Section */
.coord-input-section {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

.coord-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 20px;
}

.coord-input-wrapper {
    position: relative;
}

.coord-input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--digipin-accent);
    font-size: 1.2rem;
}

.coord-input {
    width: 100%;
    padding: 18px 20px 18px 50px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.coord-input:focus {
    outline: none;
    border-color: var(--digipin-accent);
    box-shadow: 0 0 0 4px rgba(255, 103, 37, 0.1);
}

.find-digipin-btn {
    padding: 18px 35px;
    background: var(--digipin-primary);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 103, 37, 0.3);
    position: relative;
    overflow: hidden;
}

.find-digipin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.find-digipin-btn:hover::before {
    left: 100%;
}

.find-digipin-btn:hover {
    transform: translateY(-2px);
    background: var(--digipin-primary-dark);
    box-shadow: 0 12px 35px rgba(255, 103, 37, 0.4);
}

/* DIGIPIN Result Display */
.digipin-result {
    display: none;
    margin-top: 30px;
    animation: resultSlideIn 0.5s ease;
}

.digipin-result.show {
    display: block;
}

@keyframes resultSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    background: linear-gradient(135deg, var(--digipin-primary) 0%, var(--digipin-primary-light) 100%);
    border-radius: 24px;
    padding: 40px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(255, 103, 37, 0.3);
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.result-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.result-label {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
    font-weight: 300;
}

.digipin-code {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 8px;
    margin-bottom: 30px;
    font-family: 'Courier New', monospace;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    word-break: break-all;
    animation: codeReveal 0.8s ease;
}

@keyframes codeReveal {
    from {
        letter-spacing: 20px;
        opacity: 0;
    }
    to {
        letter-spacing: 8px;
        opacity: 1;
    }
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Location Details */
.location-details {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

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

.detail-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

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

/* Info Section */
.info-section {
    background: linear-gradient(135deg, #fff5f2 0%, #ffebe4 100%);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.info-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--digipin-primary);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--digipin-primary) 0%, var(--digipin-primary-light) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(255, 103, 37, 0.3);
}

.info-card h4 {
    color: var(--digipin-dark);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.info-card p {
    color: #6c757d;
    line-height: 1.7;
}

/* Article Section */
.article-section {
    background: white;
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.article-section h2 {
    color: var(--digipin-dark);
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.article-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--digipin-primary);
    border-radius: 2px;
}

.article-content {
    margin-top: 40px;
}

.article-content h5 {
    color: var(--digipin-dark);
    font-size: 1.5rem;
    margin: 30px 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-content h5 i {
    color: var(--digipin-primary);
}

.article-content p {
    color: #6c757d;
    line-height: 1.8;
    margin-bottom: 20px;
}

.article-content ul {
    list-style: none;
    padding-left: 0;
}

.article-content ul li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    color: #6c757d;
    line-height: 1.8;
}

.article-content ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--digipin-primary);
}

/* Loading State */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 20px;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--digipin-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--digipin-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--digipin-dark);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    font-size: 1.5rem;
}

/* Custom Marker */
.digipin-marker {
    background: var(--digipin-primary);
    border: 3px solid white;
    border-radius: 50%;
    width: 20px !important;
    height: 20px !important;
    box-shadow: 0 0 20px rgba(255, 103, 37, 0.5);
    animation: markerPulse 2s infinite;
}

@keyframes markerPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 103, 37, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 103, 37, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 103, 37, 0);
    }
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.search-result-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: #fff5f2;
    padding-left: 25px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-name {
    font-weight: 600;
    color: var(--digipin-dark);
    margin-bottom: 3px;
}

.search-result-address {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .digipin-hero {
        padding: 40px 20px;
    }

    .hero-logo h1 {
        font-size: 1.8rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .coord-input-grid {
        grid-template-columns: 1fr;
    }

    .digipin-code {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .article-section {
        padding: 30px 20px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Leaflet Map Cursor */
.leaflet-grab {
    cursor: url(../../assets/dashboard/images/icon/pointer.svg), auto !important;
}
