/* Aadhaar OCR Frontend Styles - Enhanced Design */
.aadhaar-ocr-container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    color: white;
    position: relative;
    overflow: hidden;
}

.aadhaar-ocr-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.aadhaar-ocr-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.aadhaar-ocr-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #fff, #f0f8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aadhaar-ocr-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.aadhaar-user-selection {
    margin-bottom: 40px;
    padding: 25px;
    background: rgba(255,255,255,0.15);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 1;
}

.aadhaar-user-selection h3 {
    margin-top: 0;
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.aadhaar-user-selection select {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    background: rgba(255,255,255,0.9);
    color: #333;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.aadhaar-user-selection select:focus {
    outline: none;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.aadhaar-hits-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(76, 175, 80, 0.2);
    border-left: 4px solid #4caf50;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.aadhaar-hits-info.warning {
    background: rgba(255, 193, 7, 0.2);
    border-left-color: #ffc107;
}

.aadhaar-hits-info.no-hits {
    background: rgba(244, 67, 54, 0.2);
    border-left-color: #f44336;
}

.aadhaar-hits-info.good {
    background: rgba(76, 175, 80, 0.2);
    border-left-color: #4caf50;
}

.aadhaar-upload-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.aadhaar-upload-group {
    background: rgba(255,255,255,0.1);
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.aadhaar-upload-group:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.aadhaar-upload-group h4 {
    margin-bottom: 10px;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
}

.upload-description {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 15px;
    text-align: center;
    font-style: italic;
}

.aadhaar-upload-area {
    position: relative;
    border: 3px dashed rgba(255,255,255,0.4);
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.aadhaar-upload-area:hover {
    border-color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.1);
    transform: scale(1.02);
}

.aadhaar-upload-area.dragover {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.05);
}

.aadhaar-upload-area.has-file {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.15);
    border-style: solid;
}

.aadhaar-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.aadhaar-upload-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

.aadhaar-upload-text {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    line-height: 1.5;
}

.aadhaar-upload-text strong {
    color: #fff;
    font-size: 18px;
}

.aadhaar-upload-text small {
    display: block;
    margin-top: 8px;
    opacity: 0.7;
}

.aadhaar-process-section {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

.aadhaar-process-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(238, 90, 36, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.aadhaar-process-btn:hover::before {
    left: 100%;
}

.aadhaar-process-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(238, 90, 36, 0.4);
}

.aadhaar-process-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.aadhaar-process-btn.ready {
    background: linear-gradient(45deg, #4caf50, #45a049);
    animation: pulse 2s infinite;
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
}

@keyframes pulse {
    0% { box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 15px 35px rgba(76, 175, 80, 0.5); }
    100% { box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3); }
}

.process-note {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-top: 15px;
    text-align: center;
}

.aadhaar-ocr-result {
    margin-top: 30px;
    position: relative;
    z-index: 1;
    display: none;
}

.aadhaar-message {
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.aadhaar-success {
    background: rgba(76, 175, 80, 0.2);
    color: #fff;
    border-left: 5px solid #4caf50;
}

.aadhaar-error {
    background: rgba(244, 67, 54, 0.2);
    color: #fff;
    border-left: 5px solid #f44336;
}

.extracted-data {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.extracted-data h4 {
    margin-top: 0;
    color: #4caf50;
    font-size: 1.2rem;
}

.extracted-data ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.extracted-data li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
}

.extracted-data li:last-child {
    border-bottom: none;
}

.success-note {
    background: rgba(76, 175, 80, 0.2);
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}

.aadhaar-loading {
    text-align: center;
    padding: 30px;
    color: #fff;
}

.aadhaar-loading-spinner {
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* File Info Styles */
.aadhaar-file-info {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.aadhaar-file-name {
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
    font-size: 14px;
}

.aadhaar-file-size {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    margin-bottom: 10px;
}

.clear-file {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-file:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.aadhaar-preview-image {
    max-width: 100%;
    max-height: 120px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-top: 10px;
    border: 2px solid rgba(255,255,255,0.3);
}

/* Button Variations */
.aadhaar-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    margin: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aadhaar-btn-warning {
    background: linear-gradient(45deg, #ffc107, #ff9800);
    color: #333;
}

.aadhaar-btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .aadhaar-ocr-container {
        margin: 15px;
        padding: 20px;
    }
    
    .aadhaar-ocr-header h2 {
        font-size: 2rem;
    }
    
    .aadhaar-upload-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .aadhaar-upload-area {
        padding: 30px 15px;
        min-height: 150px;
    }
    
    .aadhaar-upload-icon {
        font-size: 3rem;
    }
    
    .aadhaar-process-btn {
        padding: 15px 30px;
        font-size: 16px;
    }
    
    .extracted-data li {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .aadhaar-ocr-header h2 {
        font-size: 1.5rem;
    }
    
    .aadhaar-upload-area {
        padding: 20px 10px;
        min-height: 120px;
    }
    
    .aadhaar-process-btn {
        padding: 12px 25px;
        font-size: 14px;
    }
}

/* Shortcode Styles */
.aadhaar-hits-remaining {
    font-weight: bold;
    color: #4caf50;
    font-size: 1.1em;
}

.aadhaar-hits-remaining.low {
    color: #ff9800;
}

.aadhaar-hits-remaining.none {
    color: #f44336;
}

/* Form Integration Styles */
.gform_wrapper .aadhaar-ocr-container {
    margin-bottom: 30px;
}

.gform_wrapper .aadhaar-upload-section {
    margin-bottom: 30px;
}

/* Animation for success state */
@keyframes successGlow {
    0% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
    50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8); }
    100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
}

.aadhaar-upload-area.has-file {
    animation: successGlow 2s ease-in-out infinite;
}