
/* ═══════════════════════════════════════════════════════
   CSR Generator Tool - Shared Stylesheet
   Deploy to:
   - CheapSSL: /ssltools/css/csr-generator.css
   - TheSSLStore: /ssltools/css/csr-generator.css
   - ComodoSSLStore: /ssltools/css/csr-generator.css
   - RapidSSLOnline: /ssl-tools/css/csr-generator.css
   - SSLRenewals: /ssl-tools/css/csr-generator.css
   - SectigoStore: /ssl-tools/css/csr-generator.css
   ═══════════════════════════════════════════════════════ */

/* ═══ Reset Overrides ═══ */
.csr-page-wrap { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.csr-page-wrap *, .csr-page-wrap *::before, .csr-page-wrap *::after { box-sizing: border-box; }

/* ═══ Utility Classes ═══ */
.d-none { display: none !important; }
.d-flex { display: flex !important; align-items: center; }
.mt-10 { margin-top: 10px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-white { color: #fff; }
.clear { clear: both; }

/* ═══ Form Wrapper ═══ */
.csr-form-wrap {
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-top: 15px;
}

/* ═══ Field Rows ═══ */
.csr-form-wrap .field-row {
    margin-bottom: 16px;
    position: relative;
}

.csr-form-wrap .field-row label {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
}

.csr-form-wrap .field-row label .req {
    color: #d9534f;
    margin-left: 3px;
    font-weight: bold;
}

.csr-form-wrap .field-row label .sub {
    font-weight: normal;
    font-size: 11px;
    color: #777;
    margin-left: 6px;
}

/* ═══ Inputs & Selects ═══ */
.csr-form-wrap .field-row input[type="text"],
.csr-form-wrap .field-row select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.csr-form-wrap .field-row select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 34px;
}

.csr-form-wrap .field-row input[type="text"]:focus,
.csr-form-wrap .field-row select:focus {
    border-color: #3aada8;
    box-shadow: 0 0 0 2px rgba(58, 173, 168, 0.1);
}

/* ═══ Error Messages ═══ */
.csr-form-wrap .err-msg {
    color: #d9534f;
    font-size: 12px;
    margin-top: 4px;
    display: none;
    font-weight: 500;
}

/* ═══ Flex Row (Algorithm + Key Size) ═══ */
.csr-form-wrap .flex-row {
    display: flex;
    gap: 14px;
}

.csr-form-wrap .flex-row .field-row {
    flex: 1;
}

/* ═══ Captcha ═══ */
.csr-form-wrap .captcha-wrap {
    display: flex;
    justify-content: center;
    margin: 18px 0 8px;
}

/* ═══ Button ═══ */
.csr-form-wrap .btn-wrap {
    text-align: center;
    margin-top: 12px;
}

.gbtn {
    background: #5cb85c;
    color: #fff;
    border: none;
    padding: 11px 40px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gbtn:hover {
    background: #4cae4c;
}

.gbtn:disabled {
    background: #999;
    cursor: not-allowed;
}

/* ═══ Loading Spinner ═══ */
.csr-loading {
    text-align: center;
    padding: 30px;
    display: none;
    font-size: 13px;
    color: #555;
}

.csr-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid #ddd;
    border-top-color: #3aada8;
    border-radius: 50%;
    animation: csrspin 0.7s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes csrspin {
    to { transform: rotate(360deg); }
}

/* ═══ Results Wrapper ═══ */
.csr-results-wrap {
    display: none;
    margin-top: 15px;
}

/* ═══ Sections (Collapsible) ═══ */
.csr-section {
    margin-bottom: 15px;
}

.csr-section-hdr {
    background: #5cb85c;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 16px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border: none;
    border-radius: 3px 3px 0 0;
    font-family: inherit;
    width: 100%;
}

.csr-section-hdr:hover {
    background: #5cb85c;
}

.csr-section-hdr .arr {
    font-size: 12px;
    color: #fff;
}

.csr-section-bdy {
    background: #fff;
    padding: 18px;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 3px 3px;
}

.csr-section-bdy h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.csr-section-bdy h4.stp2 {
    margin-top: 20px;
}

.csr-section-bdy h5 {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin: 16px 0 6px;
}

.csr-section-bdy h5:first-of-type {
    margin-top: 0;
}

.csr-alt-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 14px;
}

/* ═══ Download Button ═══ */
.dl-btn {
    background: #5cb85c;
    color: #fff;
    border: none;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
    margin-bottom: 12px;
    transition: background 0.2s ease;
}

.dl-btn:hover {
    background: #4cae4c;
}

/* ═══ Code Boxes ═══ */
.code-wrap {
    position: relative;
    margin-bottom: 8px;
}

.code-box {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 10px 38px 10px 12px;
    font-family: "Courier New", Courier, monospace;
    font-size: 11.5px;
    color: #333;
    white-space: pre-wrap;
    word-break: break-all;
    word-wrap: break-word;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.5;
    margin: 0;
    cursor: pointer;
    display: block;
    transition: background 0.15s ease;
}

.code-box:hover {
    background: #f0f0f0;
}

.code-box.csr-out {
    max-height: 160px;
}

.code-box.iis-out {
    max-height: 110px;
    overflow-y: scroll;
}

/* ═══ Copy Button ═══ */
.cp-btn {
    position: absolute;
    top: 7px;
    right: 7px;
    background: none;
    border: none;
    padding: 3px;
    cursor: pointer;
    opacity: 0.5;
    line-height: 1;
    transition: opacity 0.2s ease;
}

.cp-btn:hover {
    opacity: 1;
}

.cp-btn svg {
    width: 16px;
    height: 16px;
    fill: #666;
    display: block;
}

/* ═══ Info Section ═══ */
.csr-info {
    background: #f0f9f9;
    border-radius: 4px;
    padding: 18px;
    margin-top: 20px;
    border: 1px solid #d4eded;
}

.csr-info h2 {
    font-size: 15px;
    margin: 0 0 10px;
    color: #333;
}

.csr-info p {
    font-size: 12px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 10px;
}

.csr-info p:last-child {
    margin-bottom: 0;
}

/* ═══ Copy Success Flash ═══ */
.code-box.copied {
    background: #d4edda !important;
    transition: background 0.3s ease;
}

/* ═══ Responsive ═══ */
@media (max-width: 600px) {
    .csr-form-wrap .flex-row {
        flex-direction: column;
        gap: 0;
    }
    .csr-form-wrap {
        padding: 14px;
    }
    .csr-section-bdy {
        padding: 14px;
    }
}

