/* CourseExplorer Frontend Styles */

/* Login Form Styles */
.ce-login {
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ce-login .h3 {
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
}

.ce-login .form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.ce-login .form-group {
    margin-bottom: 1rem;
    padding: 0 15px;
}

.ce-login .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.ce-login .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.ce-login .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.ce-login label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.ce-login .form-control {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.ce-login .form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.ce-login .form-control-lg {
    padding: 1rem;
    font-size: 1.125rem;
    line-height: 1.5;
    border-radius: 6px;
}

.ce-login .btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    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;
}

.ce-login .btn-primary {
    color: #fff;
    background-color: #007cba;
    border-color: #007cba;
}

.ce-login .btn-primary:hover {
    color: #fff;
    background-color: #005a87;
    border-color: #005a87;
}

.ce-login .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ce-login .text-center {
    text-align: center !important;
}

.ce-login .text-left {
    text-align: left !important;
}

.ce-login .text-right {
    text-align: right !important;
}

.ce-login .my-5 {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.ce-login .mt-2 {
    margin-top: 0.5rem;
}

.ce-login .custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
}

.ce-login .custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.ce-login .custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
}

.ce-login .custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #fff;
    border: #adb5bd solid 1px;
}

.ce-login .custom-checkbox .custom-control-label::before {
    border-radius: 0.25rem;
}

.ce-login .custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: #007cba;
    background-color: #007cba;
}

.ce-login .custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='m6.564.75-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.ce-login .custom-control-label::after {
    position: absolute;
    top: 0.25rem;
    left: -1.5rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
}

.ce-login a {
    color: #007cba;
    text-decoration: none;
}

.ce-login a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Alert styles */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Form messages */
.form-messages {
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ce-login .col-md-8,
    .ce-login .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .ce-login .text-right {
        text-align: center !important;
        margin-top: 1rem;
    }
}

/* Course Explorer general styles */
.courseexplorer-widget {
    margin: 2rem 0;
}

.cexp-logged-in-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

/* ==========================================================================
   Editor Placeholder Styles (Elementor, Gutenberg, etc.)
   ========================================================================== */

.ce-editor-placeholder {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    text-align: center;
    margin: 1rem 0;
}

.ce-editor-placeholder__header {
    margin-bottom: 1.5rem;
}

.ce-editor-placeholder__icon {
    display: inline-block;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.ce-editor-placeholder__header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.ce-editor-placeholder__content {
    margin-bottom: 1.5rem;
}

.ce-editor-placeholder__content p {
    margin: 0 0 0.5rem;
    color: #64748b;
    font-size: 0.9375rem;
}

.ce-editor-placeholder__features {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.ce-editor-placeholder__features li {
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.ce-editor-placeholder__footer {
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.ce-editor-placeholder__footer small {
    color: #94a3b8;
    font-family: monospace;
    font-size: 0.75rem;
}

/* Auth Info Box (already logged in state) */
.ce-auth-info {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
}

.ce-auth-info__icon {
    width: 3rem;
    height: 3rem;
    background: #22c55e;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.ce-auth-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #166534;
}

.ce-auth-info p {
    margin: 0 0 1.5rem;
    color: #15803d;
}

.ce-auth-info .ce-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ce-auth-info .ce-button--primary {
    background: #22c55e;
    color: white;
}

.ce-auth-info .ce-button--primary:hover {
    background: #16a34a;
}
