/* Additional custom styles for Bulma */
:root {
    --primary-color: #3273dc;
    --secondary-color: #4FB3D9;
    --success-color: #48c774;
    --warning-color: #ffdd57;
    --danger-color: #f14668;
    --text-color: #363636;
    --background-light: #f5f7fa;
    --box-shadow: 0 2px 15px rgba(10, 10, 10, 0.1);
}

/* Apply custom font to entire page */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background-color: #f8f9fa;
}

.container {
    flex: 1;
}

/* Optimized box layout for desktop and mobile */
.main-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-box {
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 2px 15px rgba(10, 10, 10, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

@media screen and (max-width: 768px) {
    .main-box {
        padding: 1.5rem;
    }
}

/* Updated box style */
.box {
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    border-radius: 8px;
    background-color: white;
}

/* Improved notification colors */
.notification.is-success {
    background-color: #ebfaf0;
    color: #257942;
    border-left: 4px solid var(--success-color);
}

.notification.is-info {
    background-color: #ebf5fc;
    color: #1d72aa;
    border-left: 4px solid var(--secondary-color);
}

/* Better button styling */
.button.is-primary {
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.button.is-primary:hover {
    background-color: #2366c9;
    box-shadow: 0 4px 10px rgba(50, 115, 220, 0.3);
}

/* Spacing utilities */
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 2rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

/* Improved copy area styles */
.copy-area {
    transition: all 0.2s ease;
    word-wrap: break-word;
    white-space: pre-wrap;
    min-height: 80px !important;
    overflow-y: auto !important;
    max-height: 250px;
    line-height: 1.6;
    position: relative;
    padding-right: 60px !important; /* Space for the copy button */
    border-left: 3px solid var(--secondary-color) !important;
    background-color: var(--background-light) !important;
}

.copy-area:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* New copy container layout */
.copy-container {
    display: flex;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid #e8e8e8;
    flex-direction: row-reverse;
}

.copy-text-area {
    flex: 1;
    padding: 16px;
    background-color: #f9f9f9;
    height: 80px;
    overflow-y: auto;
    overflow-x: auto;
    white-space: nowrap;
    line-height: 1.6;
    color: #333;
    border-left: 1px solid #e8e8e8;
}

.copy-button-area {
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.copy-button-area:hover,
.copy-button-area.is-hovered {
    background-color: #e9e9e9;
}

.copy-button-area.copied {
    background-color: #ebf7ee;
}

.copy-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.copy-icon-container i {
    font-size: 2rem;
    color: #555;
    margin-bottom: 8px;
}

.copy-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
}

/* Feedback styling */
.copy-feedback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background-color: var(--success-color);
    color: white;
    text-align: center;
    font-weight: bold;
    display: none;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

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

/* Responsive adjustments for new copy container */
@media screen and (max-width: 768px) {
    .copy-container {
        flex-direction: column;
    }
    
    .copy-text-area {
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
        height: 80px;
        overflow-x: auto;
    }
    
    .copy-button-area {
        width: 100%;
        padding: 10px;
        flex-direction: row;
    }
    
    .copy-icon-container {
        flex-direction: row;
    }
    
    .copy-icon-container i {
        margin-bottom: 0;
        margin-right: 10px;
    }
}

/* Form and input styling */
.label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Table styling */
.table.is-hoverable tr:hover {
    background-color: #f0f5ff !important;
}

/* Buttons styling in admin table */
.table .buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.button.is-info.is-light {
    background-color: #ebf7ff;
    color: #1d72aa;
    border-color: #d0e7f8;
}

.button.is-info.is-light:hover {
    background-color: #d6ecff;
}

/* Section divider styling */
.section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    color: #555;
    font-weight: 600;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.section-divider::before {
    margin-right: 1em;
}

.section-divider::after {
    margin-left: 1em;
}

.section-divider span {
    padding: 0 10px;
    background-color: white;
    color: var(--primary-color);
}

/* Admin login page styling */
.admin-login-container {
    max-width: 500px;
    margin: 50px auto;
}

.login-box {
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.login-title {
    margin-bottom: 30px;
    color: var(--text-color);
}

.login-input {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: none;
}

.login-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(50, 115, 220, 0.25);
}

.login-button {
    width: 100%;
    padding: 12px;
    font-weight: 600;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-button:hover {
    background-color: #2366c9;
    box-shadow: 0 4px 10px rgba(50, 115, 220, 0.3);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .file-name {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .title.is-4 {
        font-size: 1.3rem;
    }
    
    .copy-button {
        width: 35px !important;
        height: 35px !important;
    }
    
    .copy-container {
        flex-direction: column;
    }
    
    .copy-text-area {
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
        height: 80px;
        overflow-x: auto;
    }
    
    .copy-button-area {
        width: 100%;
        padding: 10px;
        flex-direction: row;
        justify-content: space-between;
    }
    
    .copy-icon-container {
        flex-direction: row;
    }
    
    .copy-icon-container i {
        margin-bottom: 0;
        margin-right: 10px;
    }
    
    .admin-login-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .login-box {
        padding: 20px;
    }
}
