/**
 * Academic Profile Styles with Strong Elementor Overrides
 */

/* Container styles */
.academic-profile-container {
    max-width: 100%;
    margin: 0;
    padding: 20px;
    background: transparent;
}

.academic-profile-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    text-align: left;
}

.academic-profile-container h3 {
    font-size: 20px;
    margin-bottom: 15px!important;
    color: #444;
    text-align: left;
}

.academic-profile-container h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #555;
    text-align: left;
}

/* Form elements */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    justify-content: flex-start;
}

.form-group {
    margin-bottom: 20px;
    flex: 1;
    text-align: left;
    position: relative;
}

.form-section {
    margin-bottom: 25px;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    text-align: left;
}

.form-group input[type="text"],
.form-group input[type="month"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-inline {
    margin-top: 10px;
}

.checkbox-inline label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-inline input[type="checkbox"] {
    margin-right: 8px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.required {
    color: #e53935;
    font-weight: bold;
}

.education-entries-container {
    margin-bottom: 30px;
}

.education-entry {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    padding-right: 60px !important;
    padding-bottom: 50px !important; /* Add padding at the bottom for the buttons */
    margin-bottom: 15px;
    position: relative !important;
}

.education-entry-header {
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 10px;
    width: 100%;
}

.education-entry-info {
    flex: 1;
    padding-right: 15px;
}

.education-entry-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.education-entry-institution {
    font-style: italic;
    color: #555;
}

.education-entry-field {
    color: #666;
    font-size: 14px;
}

.education-entry-meta {
    text-align: right;
    min-width: 140px;
    max-width: 140px;
}

.education-entry-dates,
.education-entry-status,
.education-entry-location {
    color: #777;
    font-size: 14px;
}

.education-entry-status {
    font-style: italic;
}

.education-entry-location {
    margin-top: 5px;
    padding-right: 0;
}

.education-entry-details {
    margin-top: 10px;
    font-size: 14px;
    border-top: 1px dashed #eee;
    padding-top: 10px;
}

.education-entry-actions {
    position: absolute !important;
    bottom: 15px !important; /* Position at the bottom instead of top */
    right: 15px !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
    z-index: 99 !important;
}

.education-entry-actions button,
.education-entry-actions .edit-education-btn,
.education-entry-actions .delete-education-btn {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 5px !important;
    font-size: 16px !important;
    color: #777 !important;
    transition: color 0.2s !important;
    z-index: 100 !important;
    min-width: auto !important;
    min-height: auto !important;
    line-height: 1 !important;
}

.education-entry-actions .edit-education-btn:hover {
    color: #4285f4 !important;
}

.education-entry-actions .delete-education-btn:hover {
    color: #dc3545 !important;
}

.education-entry-actions .dashicons {
    font-size: 18px !important;
    line-height: 1 !important;
}

.add-education-container {
    margin-bottom: 30px;
    text-align: left;
}

#add-education-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 8px 15px !important;
    font-size: 14px !important;
    background: #000000 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
}

#add-education-btn:hover {
    background: #333333 !important;
}

#add-education-btn .dashicons {
    font-size: 16px !important;
}

#education-form .form-actions button {
    padding: 8px 15px !important;
    font-size: 14px !important;
}

#save-education-btn {
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
}

#save-education-btn:hover {
    background-color: #333333 !important;
}

#cancel-education-btn {
    background-color: #f2f2f2 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

#cancel-education-btn:hover {
    background-color: #e5e5e5 !important;
}

.toggleable-section .toggle-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #0073aa;
}

.toggleable-section .toggle-icon {
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 18px;
    border-radius: 50%;
    background-color: #f0f0f0;
    margin-right: 8px;
    font-weight: bold;
    font-size: 16px;
    color: #555;
}

.toggleable-section.expanded .toggle-icon {
    content: "-";
}

.city-autocomplete {
    width: 100%;
    position: relative;
}

.city-suggestions {
    position: absolute;
    z-index: 10 !important;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.city-suggestion-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.city-suggestion-item:hover {
    background-color: #f9f9f9;
}

.city-suggestion-item.loading,
.city-suggestion-item.error-message,
.city-suggestion-item.no-results {
    color: #777;
    font-style: italic;
    cursor: default;
}

#academic-profile-message {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

#academic-profile-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#academic-profile-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #777;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .education-entry {
        padding-right: 15px !important;
        padding-bottom: 50px !important; /* Ensure padding at the bottom on mobile */
    }

    .education-entry-header {
        flex-direction: column !important;
    }

    .education-entry-info {
        padding-right: 0;
    }

    .education-entry-meta {
        text-align: left;
        margin-top: 5px;
        max-width: 100%;
    }

    .education-entry-actions {
        bottom: 10px !important;
        right: 10px !important;
    }
}