/* Modal Styles */
.cups-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.cups-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 700px;
    position: relative;
}

.cups-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.cups-close:hover {
    color: #000;
}

/* Form Styles */
.cups-form-group {
    margin-bottom: 20px;
}

.cups-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

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

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

/* Rich Text Editor Styles */
#cups-rich-text-editor {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

#cups-editor-toolbar {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 8px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.cups-editor-btn {
    background: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.cups-editor-btn:hover {
    background: #e9e9e9;
    border-color: #999;
}

.cups-editor-btn:active {
    background: #d9d9d9;
}

.cups-editor-area {
    min-height: 200px;
    padding: 15px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    overflow-y: auto;
    max-height: 400px;
}

.cups-editor-area:focus {
    background: #fffef0;
}

.cups-editor-area ul, .cups-editor-area ol {
    margin: 0 0 10px 20px;
    padding: 0;
}

.cups-editor-area li {
    margin-bottom: 5px;
}

/* Link Dialog Styles */
.cups-dialog {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.cups-dialog-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
}

.cups-dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cups-dialog-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#cups-link-insert {
    background: #007cba;
    color: white;
}

#cups-link-cancel {
    background: #6c757d;
    color: white;
}

/* Captcha Styles */
.cups-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
}

#cups-captcha-question {
    font-weight: bold;
    background: #f0f0f0;
    padding: 8px 12px;
    border-radius: 4px;
    min-width: 150px;
}

#cups-captcha-answer {
    width: 100px !important;
}

/* Button Styles */
.cups-open-modal {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.cups-open-modal:hover {
    background: #005a87;
}

#cups-submit-btn {
    background: #28a745;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
}

#cups-submit-btn:hover:not(:disabled) {
    background: #218838;
}

#cups-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Message Styles */
#cups-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .cups-modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
    
    .cups-captcha {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #cups-captcha-answer {
        width: 100% !important;
    }
    
    #cups-editor-toolbar {
        justify-content: center;
    }
    
    .cups-editor-area {
        min-height: 150px;
        max-height: 300px;
    }
}