<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:ffd="http://xbrl.sec.gov/ffd/2025"
  xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <link:schemaRef
      xlink:href="https://xbrl.sec.gov/ffd/2025/ffd-2025.xsd"
      xlink:type="simple"/>
    <context id="rc">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001750284</identifier>
        </entity>
        <period>
            <startDate>2025-11-18</startDate>
            <endDate>2025-11-18</endDate>
        </period>
    </context>
    <context id="offrl_1">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001750284</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>1</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2025-11-18</startDate>
            <endDate>2025-11-18</endDate>
        </period>
    </context>
    <context id="offrl_2">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001750284</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>2</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2025-11-18</startDate>
            <endDate>2025-11-18</endDate>
        </period>
    </context>
    <context id="offrl_3">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001750284</identifier>
            <segment>
                <xbrldi:typedMember dimension="ffd:OfferingAxis">
                    <dei:lineNo>3</dei:lineNo>
                </xbrldi:typedMember>
            </segment>
        </entity>
        <period>
            <startDate>2025-11-18</startDate>
            <endDate>2025-11-18</endDate>
        </period>
    </context>
    <unit id="USD">
        <measure>iso4217:USD</measure>
    </unit>
    <unit id="pure">
        <measure>pure</measure>
    </unit>
    <unit id="Shares">
        <measure>shares</measure>
    </unit>
    <ffd:FormTp contextRef="rc" id="ixv-362">S-3</ffd:FormTp>
    <ffd:SubmissnTp contextRef="rc" id="ixv-363">S-3MEF</ffd:SubmissnTp>
    <ffd:FeeExhibitTp contextRef="rc" id="ixv-364">EX-FILING FEES</ffd:FeeExhibitTp>
    <ffd:RegnFileNb contextRef="rc" id="ixv-365">333-284146</ffd:RegnFileNb>
    <dei:EntityCentralIndexKey contextRef="rc" id="ixv-366">0001750284</dei:EntityCentralIndexKey>
    <dei:EntityRegistrantName contextRef="rc" id="ixv-367">Olema Pharmaceuticals, Inc.</dei:EntityRegistrantName>
    <ffd:OfferingTableNa contextRef="rc" id="hiddenrcOfferingTableNa" xsi:nil="true"/>
    <ffd:OffsetTableNa contextRef="rc" id="hiddenrcOffsetTableNa">N/A</ffd:OffsetTableNa>
    <ffd:CombinedProspectusTableNa contextRef="rc" id="hiddenrcCombinedProspectusTableNa">N/A</ffd:CombinedProspectusTableNa>
    <ffd:FeeRate
      contextRef="offrl_1"
      decimals="INF"
      id="ixv-371"
      unitRef="pure">0.0001381</ffd:FeeRate>
    <ffd:FeeRate
      contextRef="offrl_2"
      decimals="INF"
      id="ixv-372"
      unitRef="pure">0.0001381</ffd:FeeRate>
    <ffd:FormTp contextRef="rc" id="ixv-415">S-3</ffd:FormTp>
    <dei:EntityRegistrantName contextRef="rc" id="ixv-416">Olema Pharmaceuticals, Inc.</dei:EntityRegistrantName>
    <ffd:OfferingSctyTp contextRef="offrl_1" id="ixv-417">Equity</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="offrl_1" id="ixv-418">Common Stock, par value $0.0001 per share</ffd:OfferingSctyTitl>
    <ffd:Rule457oFlg contextRef="offrl_1" id="ixv-419">true</ffd:Rule457oFlg>
    <ffd:OfferingSctyTp contextRef="offrl_2" id="ixv-420">Other</ffd:OfferingSctyTp>
    <ffd:OfferingSctyTitl contextRef="offrl_2" id="ixv-421">Warrants</ffd:OfferingSctyTitl>
    <ffd:Rule457oFlg contextRef="offrl_2" id="ixv-422">true</ffd:Rule457oFlg>
    <ffd:PrevslyPdFlg contextRef="offrl_3" id="ixv-423">false</ffd:PrevslyPdFlg>
    <ffd:OfferingSctyTp contextRef="offrl_3" id="ixv-424">Unallocated (Universal) Shelf</ffd:OfferingSctyTp>
    <ffd:Rule457oFlg contextRef="offrl_3" id="ixv-425">true</ffd:Rule457oFlg>
    <ffd:MaxAggtOfferingPric
      contextRef="offrl_3"
      decimals="INF"
      id="ixv-426"
      unitRef="USD">40000000.00</ffd:MaxAggtOfferingPric>
    <ffd:FeeRate
      contextRef="offrl_3"
      decimals="INF"
      id="ixv-427"
      unitRef="pure">0.0001381</ffd:FeeRate>
    <ffd:FeeAmt
      contextRef="offrl_3"
      decimals="INF"
      id="ixv-428"
      unitRef="USD">5524.00</ffd:FeeAmt>
    <ffd:TtlOfferingAmt contextRef="rc" decimals="INF" id="ixv-429" unitRef="USD">40000000.00</ffd:TtlOfferingAmt>
    <ffd:TtlFeeAmt contextRef="rc" decimals="INF" id="ixv-430" unitRef="USD">5524.00</ffd:TtlFeeAmt>
    <ffd:TtlPrevslyPdAmt contextRef="rc" decimals="INF" id="ixv-431" unitRef="USD">0.00</ffd:TtlPrevslyPdAmt>
    <ffd:TtlOffsetAmt contextRef="rc" decimals="INF" id="ixv-432" unitRef="USD">0.00</ffd:TtlOffsetAmt>
    <ffd:NetFeeAmt contextRef="rc" decimals="INF" id="ixv-433" unitRef="USD">5524.00</ffd:NetFeeAmt>
    <ffd:OfferingNote contextRef="offrl_3" id="ixv-434">The Registrant previously registered the offer and sale of certain securities, including its common stock, par value $0.0001 per share, having a proposed maximum aggregate offering price of $200,000,000 pursuant to Registration Statement on Form S-3 (File No. 333-284146), which was filed on January 6, 2025 and declared effective by the SEC on January 15, 2025 (the "Prior Registration Statement"). As of the date hereof, a balance of $200,000,000 of such securities remains unsold under the Prior Registration Statement. In accordance with Rule 462(b) under the Securities Act of 1933, as amended, and General Instruction IV(A) of Form S-3, the Registrant is hereby registering the offer and sale of an additional $40,000,000 of its shares of common stock. The additional amount of securities that is being registered for offer and sale represents no more than 20% of the maximum aggregate offering price of the remaining securities available to be sold under the Prior Registration Statement.</ffd:OfferingNote>
</xbrl>
