article {
    height: calc(100vh - 42px);  /* Adjusted from 56px to 42px (25% smaller) */
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-radius: 24px;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.input-group .form-control:focus {
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    border-color: #ddd;
}

.btn-light {
    padding: 8px 16px;
    border: 1px solid #f8f9fa;
}

.btn-light:hover {
    border: 1px solid #dadce0;
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
}

.search-result {
    padding: 8px 0;
}

header .btn {
    border: 1px solid #c2c2c3;
}

.search-result .title {
    cursor: pointer;
}

.search-result .title:hover {
    text-decoration: underline;
}

.search-result .url {
    font-size: 14px;
}

.search-result .description {
    font-size: 14px;
    line-height: 1.5;
}

/* When showing results, adjust article height */
article.has-results {
    height: auto;
    align-items: flex-start;
    padding-bottom: 2rem;
}

.result-item {
    cursor: pointer;
    padding: 8px 0;
}

.result-item:hover .result-title {
    text-decoration: underline;
}

.loading-animation {
    text-align: center;
    padding: 40px 0;
}

.loading-animation .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 4px;
    border-radius: 50%;
    background-color: #4285f4;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-animation .dot:nth-child(1) { animation-delay: -0.32s; }
loading-animation .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 
    40% { 
        transform: scale(1.0);
    }
}

.url-container {
    display: flex;
    align-items: center;
    gap: 4px;
}

.url-container .bi-lock-fill {
    font-size: 12px;
}

header {
    padding: 0.375rem !important;  /* 25% smaller than 0.5rem */
}

header .btn {
    padding: 0.375rem 0.75rem;  /* 25% smaller padding */
    font-size: 0.875rem;  /* 25% smaller font size */
}

header .form-control {
    height: calc(1.5em + 0.75rem + 2px);  /* 25% smaller input height */
    font-size: 0.875rem;  /* 25% smaller font size */
}

header .bi {
    font-size: 0.875rem;  /* 25% smaller icons */
}

.webmail-login {
    background-color: #f8f9fa;
    min-height: calc(100vh - 42px);
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.webmail-login .card {
    border: none;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.webmail-login .input-group-text {
    background-color: transparent;
    border-right: none;
}

.webmail-login .form-control {
    border-left: none;
}

.webmail-login .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.webmail-login .btn-primary {
    padding: 0.75rem;
}

.webmail-interface {
    background-color: #f8f9fa;
    min-height: calc(100vh - 42px);
    display: flex;
    align-items: flex-start;
    padding: 1rem;
}

.webmail-interface .bg-light {
    border-right: 1px solid #e9ecef;
}

.webmail-interface .btn-danger {
    background-color: #d93025;
    border-color: #d93025;
}

.webmail-interface .btn-danger:hover {
    background-color: #c5221f;
    border-color: #c5221f;
}

.webmail-interface .card {
    width: 100%;
    border: none;
    border-radius: 0;
}

.webmail-interface .card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
}

.webmail-interface .list-group-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
}

.webmail-interface .list-group-item:last-child {
    border-bottom: none;
}

.webmail-interface .btn-outline-secondary {
    border-color: #ced4da;
}

.webmail-interface .btn-outline-secondary:hover {
    background-color: #e9ecef;
}

.webmail-interface .input-group .form-control {
    border-radius: 0;
}

.webmail-interface .input-group .btn-outline-secondary {
    border-radius: 0;
}

.new-message {
    background-color: #e9f7fe;
    font-weight: bold;
}

.full-message {
    margin-top: 10px;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 5px;
}

.full-message .action-icons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.full-message .action-icons .icon {
    cursor: pointer;
    font-size: 16px;
    color: #6c757d;
}

.full-message .action-icons .icon:hover {
    color: #495057;
}

.download-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.progress {
    height: 6px;
    border-radius: 3px;
}

.download-actions {
    display: flex;
    gap: 10px;
}

.alert {
    font-size: 0.875rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

/* New message visibility and animations */
.message-hidden {
    display: none;
}

.message-fade-in {
    animation: fadeIn 0.5s ease-in;
}

.refresh-spin {
    animation: spin 1s linear;
}

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

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

.list-group-flush {
    position: relative;
}

.refresh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.refresh-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-success {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: #28a745;
    color: white;
    text-align: center;
    font-size: 18px;
    padding: 1.4rem 2rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.login-success.show {
    transform: translateY(0);
}

.login-success i {
    margin-right: 0.5rem;
}
