/* BolGini Dashboard Custom Styles */

/* Remove text-decoration from all links and buttons globally */
a,
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.btn,
.geex-btn,
[class*="btn"],
[class*="button"] {
    text-decoration: none !important;
}

a:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
.btn:hover,
.geex-btn:hover,
[class*="btn"]:hover,
[class*="button"]:hover {
    text-decoration: none !important;
}

/* Enhanced Form Styling */
.geex-content__form__single-group {
    margin-bottom: 24px;
}

.geex-content__form__single-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #344767;
    font-size: 14px;
}

.geex-content__form__single-group input,
.geex-content__form__single-group select,
.geex-content__form__single-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d2d6da;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #344767;
    background-color: #fff;
    transition: all 0.15s ease-in-out;
}

.geex-content__form__single-group input:focus,
.geex-content__form__single-group select:focus,
.geex-content__form__single-group textarea:focus {
    outline: none;
    border-color: #5e72e4;
    box-shadow: 0 0 0 0.2rem rgba(94, 114, 228, 0.25);
}

.geex-content__form__single-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Disabled textarea styling */
.geex-content__form__single-group textarea:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Prompt notice styling */
.prompt-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    color: #1976d2;
    font-size: 14px;
    font-weight: 500;
}

.prompt-notice i {
    font-size: 16px;
    color: #2196f3;
}

/* Logout button styling */
.logout-link {
    color: #dc3545 !important;
    border-top: 1px solid #e9ecef;
    margin-top: 10px;
    padding-top: 15px !important;
}

.logout-link:hover {
    background-color: #fff5f5 !important;
    color: #c82333 !important;
}

.logout-link i {
    color: #dc3545 !important;
}

.logout-link:hover i {
    color: #c82333 !important;
}

/* Button Enhancement */
.geex-btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.geex-btn--primary {
    background-color: #5e72e4;
    color: white;
}

.geex-btn--primary:hover {
    background-color: #4c63d2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(94, 114, 228, 0.3);
}

.geex-btn--success {
    background-color: #2dce89;
    color: white;
}

.geex-btn--success:hover {
    background-color: #24a46d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(45, 206, 137, 0.3);
}

.geex-btn--warning {
    background-color: #fb6340;
    color: white;
}

.geex-btn--warning:hover {
    background-color: #fa3a0e;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(251, 99, 64, 0.3);
}

.geex-btn--info {
    background-color: #11cdef;
    color: white;
}

.geex-btn--info:hover {
    background-color: #0fb5d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(17, 205, 239, 0.3);
}

/* Small button variant */
.geex-btn--sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Card Enhancement */
.geex-content__card {
    padding: 24px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.15s ease-in-out;
    height: 100%;
    width: 100%;
    max-width: none;
    flex: 1;
}

.geex-content__card:hover {
    box-shadow: 0 8px 25px rgba(94, 114, 228, 0.15);
    transform: translateY(-2px);
}

.geex-content__card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.geex-content__card__header h4 {
    margin: 0;
    color: #344767;
    font-weight: 600;
}

.geex-content__card__header i {
    font-size: 24px;
    color: #5e72e4;
}

.geex-content__card p {
    color: #67748e;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.geex-content__card .geex-btn {
    margin-top: auto;
}

/* Widget Enhancement */
.geex-content__widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    width: 100%;
    max-width: none;
}

.geex-content__widget__header {
    padding: 24px 24px 0;
    border-bottom: 1px solid #f1f3f4;
}

.geex-content__widget__title {
    margin: 0 0 8px 0;
    color: #344767;
    font-weight: 600;
    font-size: 20px;
}

.geex-content__widget__subtitle {
    margin: 0 0 16px 0;
    color: #67748e;
    font-size: 14px;
}

.geex-content__widget__content {
    padding: 24px;
}

/* Stats Enhancement */
.geex-content__stats__item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f4;
}

.geex-content__stats__item:last-child {
    border-bottom: none;
}

.geex-content__stats__item__icon {
    margin-right: 16px;
}

.geex-content__stats__item__icon i {
    font-size: 24px;
    color: #5e72e4;
}

.geex-content__stats__item__content h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #344767;
}

.geex-content__stats__item__content p {
    margin: 0;
    color: #67748e;
    font-size: 12px;
}

/* Message/Alert Styling */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-info {
    background-color: #cce7ff;
    color: #004085;
}

/* Recordings specific styles */
.recordings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.date-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date-input-group label {
    font-size: 12px;
    color: #67748e;
    margin: 0;
}

.date-input-group input {
    padding: 8px 12px;
    border: 1px solid #d2d6da;
    border-radius: 6px;
    font-size: 13px;
}

.filter-button {
    padding: 8px 12px;
    background-color: #5e72e4;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-button:hover {
    background-color: #4c63d2;
}

.action-points-btn, .insights-btn {
    padding: 8px 16px;
    background-color: #2dce89;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-points-btn:hover, .insights-btn:hover {
    background-color: #24a46d;
}

.insights-btn {
    background-color: #fb6340;
}

.insights-btn:hover {
    background-color: #fa3a0e;
}

.recordings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recording-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.15s ease-in-out;
}

.recording-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.recording-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.recording-info h4 {
    margin: 0 0 5px 0;
    color: #344767;
    font-size: 16px;
}

.recording-meta {
    color: #67748e;
    font-size: 13px;
    margin-bottom: 10px;
}

.recording-actions {
    display: flex;
    gap: 10px;
}

.recording-actions .geex-btn {
    padding: 6px 12px;
    font-size: 12px;
}

.audio-controls {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f3f4;
}

.progress-container {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-bottom: 10px;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    background-color: #5e72e4;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.time-indicator {
    font-size: 12px;
    color: #67748e;
    text-align: center;
}

.toggle-details {
    background: none;
    border: none;
    color: #5e72e4;
    cursor: pointer;
    font-size: 13px;
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.toggle-details:hover {
    color: #4c63d2;
}

.details-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f3f4;
}

.transcription-section, .summary-section {
    margin-bottom: 15px;
}

.transcription-section h4, .summary-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #344767;
}

.transcription-content, .summary-content {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    color: #495057;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1060 !important; /* Higher than Bootstrap modal backdrop (1050) and modal (1055) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

/* Bootstrap modal overrides */
.modal.show {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1040 !important; /* Lower than our modals */
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #344767;
    font-size: 20px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #67748e;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #344767;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-info {
    background-color: #f8f9fa;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.modal-info p {
    margin: 0;
    font-size: 13px;
    color: #67748e;
}

.action-points-content, .insights-content {
    line-height: 1.6;
}

.action-points-content h3, .insights-content h3 {
    color: #344767;
    margin-top: 20px;
    margin-bottom: 10px;
}

.action-points-content ul, .insights-content ul {
    padding-left: 20px;
}

.action-points-content li, .insights-content li {
    margin-bottom: 8px;
    color: #495057;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .geex-btn {
    position: relative;
}

.loading .geex-btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #5e72e4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rotating {
    animation: spin 0.5s linear;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .geex-content__widget__content {
        padding: 16px;
    }
    
    .geex-content__form__single-group input,
    .geex-content__form__single-group select,
    .geex-content__form__single-group textarea {
        padding: 10px 12px;
    }
    
    .geex-btn {
        padding: 10px 20px;
        width: 100%;
        justify-content: center;
    }

    .recordings-header {
        flex-direction: column;
        align-items: stretch;
    }

    .date-filters {
        flex-wrap: wrap;
    }

    .recording-actions {
        flex-direction: column;
    }
}

/* Laptop and Desktop Optimization - ALL laptop sizes and above */
@media (min-width: 769px) {
    .geex-content__widget__content {
        padding: 32px;
    }
    
    .geex-content__card {
        padding: 32px;
        min-height: 220px;
    }
    
    .geex-content__form__single-group {
        margin-bottom: 28px;
    }
    
    .geex-content__form__single-group input,
    .geex-content__form__single-group select,
    .geex-content__form__single-group textarea {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .geex-content__form__single-group label {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .geex-btn {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .geex-content__widget__title {
        font-size: 22px;
    }
    
    .geex-content__widget__subtitle {
        font-size: 15px;
    }
    
    /* Ensure full width utilization for ALL laptop screens */
    .geex-content__widget,
    .geex-content__card {
        width: 100%;
        max-width: none;
    }
    
    /* Better form row spacing */
    .row {
        margin-left: -15px;
        margin-right: -15px;
    }
    
    .row > [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Ultra-wide screens only */
@media (min-width: 1600px) {
    .geex-content__widget__content {
        padding: 40px;
    }
    
    .geex-content__card {
        padding: 40px;
        min-height: 240px;
    }
    
    .geex-content__form__single-group {
        margin-bottom: 32px;
    }
    
    .geex-content__form__single-group input,
    .geex-content__form__single-group select,
    .geex-content__form__single-group textarea {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .geex-content__form__single-group label {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .geex-btn {
        padding: 16px 32px;
        font-size: 16px;
    }
    
    /* Ensure full width utilization */
    .geex-content__widget,
    .geex-content__card {
        width: 100%;
        max-width: none;
    }
    
    /* Better spacing for form rows */
    .row {
        margin-left: -20px;
        margin-right: -20px;
    }
    
    .row > [class*="col-"] {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Authentication Page Logo Responsive Styling */
.geex-content__authentication__content__logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Responsive breakpoints for logo */
@media only screen and (max-width: 768px) {
    .geex-content__authentication__content__logo img {
        max-width: 150px;
    }
}

@media only screen and (max-width: 480px) {
    .geex-content__authentication__content__logo img {
        max-width: 120px;
    }
}

@media only screen and (max-width: 360px) {
    .geex-content__authentication__content__logo img {
        max-width: 100px;
    }
}

/* User Management Styles */
.users-list {
    margin-top: 20px;
}

.user-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 12px;
}

.badge-admin {
    background-color: #28a745;
    color: white;
}

.badge-user {
    background-color: #6c757d;
    color: white;
}

.badge-pending {
    background-color: #ffc107;
    color: #000;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.5;
    border-radius: 4px;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 3px;
}

.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
    background-color: transparent;
}

.btn-outline-success:hover {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
    background-color: transparent;
}

.btn-outline-warning:hover {
    color: #000;
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background-color: transparent;
}

.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Admin checkbox styling */
.admin-checkbox-wrapper {
    margin-top: 16px;
}

.admin-checkbox-wrapper input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.admin-checkbox-wrapper label {
    cursor: pointer;
    font-weight: 500;
}

/* User-only elements - hidden by default for admins */
.user-only {
    display: block;
}

/* Admin-only elements - hidden by default */
.admin-only {
    display: none;
}

/* System stats styling */
.geex-content__stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.geex-content__stats__item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.geex-content__stats__item:hover {
    background: #e9ecef;
}

.geex-content__stats__item__icon {
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.geex-content__stats__item__content h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.geex-content__stats__item__content p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .user-actions {
        margin-top: 12px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .geex-content__stats__item {
        flex-direction: column;
        text-align: center;
    }
    
    .geex-content__stats__item__icon {
        margin-right: 0;
        margin-bottom: 8px;
    }
}

/* Additional Modal z-index fixes */
#rechargeModal,
#validityDetailsModal,
#createTokenModal,
#tokenModal,
.modal {
    z-index: 1060 !important;
}

#rechargeModal .modal-dialog,
#validityDetailsModal .modal-dialog,
#createTokenModal .modal-dialog,
#tokenModal .modal-dialog,
.modal .modal-dialog {
    z-index: 1061 !important;
}

#rechargeModal .modal-content,
#validityDetailsModal .modal-content,
#createTokenModal .modal-content,
#tokenModal .modal-content,
.modal .modal-content {
    z-index: 1062 !important;
}

/* Ensure form elements are clickable */
.modal input,
.modal select,
.modal textarea,
.modal button,
.modal .btn,
.modal .form-control {
    position: relative !important;
    z-index: 1063 !important;
    pointer-events: auto !important;
}

/* Fix for Bootstrap modal backdrop */
.modal-backdrop.show {
    z-index: 1040 !important;
}

/* Ensure modal buttons are always clickable */
.modal .modal-footer .btn,
.modal .modal-header .btn-close,
.modal .modal-header .close {
    z-index: 1064 !important;
    pointer-events: auto !important;
}

/* Force all modals to be on top */
.modal.show,
.modal.fade.show {
    z-index: 1060 !important;
    display: block !important;
}

/* Ensure no other elements interfere */
.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Fix modal overlay issues */
.modal::before {
    content: none !important;
}

.modal * {
    pointer-events: auto !important;
}
