/**
 * Edit Post Modal Styles
 */

/* Modal Container */
.gw-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

/* Modal Overlay */
.gw-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Modal Content */
.gw-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 2;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

/* Modal Header */
.gw-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gw-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1e1e1e;
}

.gw-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.gw-modal-close:hover {
    background: #f0f0f0;
    color: #000;
}

/* Modal Body */
.gw-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Form Groups */
.gw-form-group {
    margin-bottom: 20px;
}

.gw-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e1e1e;
    font-size: 14px;
}

.gw-form-group input[type="text"],
.gw-form-group textarea,
.gw-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.gw-form-group input[type="text"]:focus,
.gw-form-group textarea:focus,
.gw-form-group select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

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

/* Character Counter */
.gw-char-counter {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

.gw-char-counter #gw-char-count {
    font-weight: 600;
    color: #2271b1;
}

/* Modal Footer */
.gw-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Buttons */
.gw-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.gw-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gw-btn-primary {
    background: #2271b1;
    color: #fff;
}

.gw-btn-primary:hover:not(:disabled) {
    background: #135e96;
}

.gw-btn-secondary {
    background: #f0f0f0;
    color: #1e1e1e;
}

.gw-btn-secondary:hover:not(:disabled) {
    background: #dcdcdc;
}

/* Messages */
.gw-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 16px;
    font-size: 14px;
}

.gw-message-success {
    background: #d7f5dd;
    color: #00450a;
    border-left: 4px solid #00a32a;
}

.gw-message-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #d63638;
}

/* Responsive */
@media (max-width: 768px) {
    .gw-modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: calc(100vh - 40px);
    }

    .gw-modal-header,
    .gw-modal-body,
    .gw-modal-footer {
        padding: 16px;
    }

    .gw-modal-header h2 {
        font-size: 20px;
    }

    .gw-modal-footer {
        flex-direction: column;
    }

    .gw-btn {
        width: 100%;
    }
}
