/* Frontend CSS for Study Materials CPT */

/* Material Type Colors */
.sm-type-paper { background: #e74c3c; }
.sm-type-mcq { background: #27ae60; }
.sm-type-ebook { background: #9b59b6; }
.sm-type-topper { background: #f39c12; }
.sm-type-notes { background: #3498db; }
.sm-type-video { background: #e74c3c; }
.sm-type-mock { background: #1abc9c; }

.sm-type-paper-badge { background: #ffebee; color: #d32f2f; }
.sm-type-mcq-badge { background: #e8f5e9; color: #388e3c; }
.sm-type-ebook-badge { background: #f3e5f5; color: #7b1fa2; }
.sm-type-topper-badge { background: #fff3e0; color: #f57c00; }
.sm-type-notes-badge { background: #e3f2fd; color: #1976d2; }
.sm-type-video-badge { background: #ffebee; color: #d32f2f; }
.sm-type-mock-badge { background: #e0f2f1; color: #00796b; }

/* Common Styles */
.sm-button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.sm-button-primary {
    background: #3498db;
    color: white;
}

.sm-button-primary:hover {
    background: #2980b9;
}

.sm-button-secondary {
    background: #2ecc71;
    color: white;
}

.sm-button-secondary:hover {
    background: #27ae60;
}

.sm-button-premium {
    background: #f39c12;
    color: white;
}

.sm-button-premium:hover {
    background: #d68910;
}

/* Spinner Animation */
@keyframes sm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sm-spinner {
    animation: sm-spin 1s linear infinite;
}

/* Notification Styles */
.sm-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    z-index: 10002;
    max-width: 400px;
    animation: sm-slide-in 0.3s ease;
}

.sm-notification-success {
    border-left: 4px solid #27ae60;
    background: #d4edda;
    color: #155724;
}

.sm-notification-error {
    border-left: 4px solid #f44336;
    background: #f8d7da;
    color: #721c24;
}

.sm-notification-info {
    border-left: 4px solid #3498db;
    background: #d1ecf1;
    color: #0c5460;
}

.sm-notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes sm-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal Styles */
.sm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.sm-modal-content {
    position: relative;
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.sm-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sm-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.sm-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-modal-body {
    padding: 20px;
}

.sm-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.sm-modal-cancel, .sm-modal-proceed {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.sm-modal-cancel {
    background: #f5f5f5;
    color: #666;
}

.sm-modal-proceed {
    background: #f39c12;
    color: white;
}

.sm-modal-cancel:hover {
    background: #e0e0e0;
}

.sm-modal-proceed:hover {
    background: #d68910;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sm-modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .sm-notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* Print Styles */
@media print {
    .sm-button,
    .sm-notification,
    .sm-modal {
        display: none !important;
    }
}